diff --git a/src/app/theme/components/baSidebar/baSidebar.service.js b/src/app/theme/components/baSidebar/baSidebar.service.js index 3c19627..4e6d75c 100644 --- a/src/app/theme/components/baSidebar/baSidebar.service.js +++ b/src/app/theme/components/baSidebar/baSidebar.service.js @@ -56,7 +56,7 @@ return result; function _iterateSubItems(currentItem) { - currentItem.subMenu && currentItem.subMenu.forEach(function(subItem) { + currentItem.subMenu?.forEach(function(subItem) { subItem.stateRef && result.push(subItem.stateRef); _iterateSubItems(subItem); }); diff --git a/src/app/theme/components/baSidebar/baSidebarHelpers.directive.js b/src/app/theme/components/baSidebar/baSidebarHelpers.directive.js index 94127ea..a5755fe 100644 --- a/src/app/theme/components/baSidebar/baSidebarHelpers.directive.js +++ b/src/app/theme/components/baSidebar/baSidebarHelpers.directive.js @@ -57,7 +57,7 @@ function BaSidebarTogglingItemCtrl($scope, $element, $attrs, $state, baSidebarService) { var vm = this; var menuItem = vm.$$menuItem = $scope.$eval($attrs.baSidebarTogglingItem); - if (menuItem && menuItem.subMenu && menuItem.subMenu.length) { + if (menuItem?.subMenu && menuItem.subMenu.length) { vm.$$expandSubmenu = function() { console.warn('$$expandMenu should be overwritten by baUiSrefTogglingSubmenu') }; vm.$$collapseSubmenu = function() { console.warn('$$collapseSubmenu should be overwritten by baUiSrefTogglingSubmenu') }; diff --git a/src/app/theme/components/baWizard/baWizardStep.directive.js b/src/app/theme/components/baWizard/baWizardStep.directive.js index 126dbd9..7f289b3 100644 --- a/src/app/theme/components/baWizard/baWizardStep.directive.js +++ b/src/app/theme/components/baWizard/baWizardStep.directive.js @@ -38,7 +38,7 @@ } function submit() { - $scope.form && $scope.form.$setSubmitted(true); + $scope.form?.$setSubmitted(true); } function isComplete() {