mirror of https://github.com/akveo/blur-admin
Merge pull request #1 from darmali89898n/deepsource-autofix-848d6758
refactor: convert logical operator to optional chaininingpull/527/head
commit
115925b42b
|
@ -56,7 +56,7 @@
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
function _iterateSubItems(currentItem) {
|
function _iterateSubItems(currentItem) {
|
||||||
currentItem.subMenu && currentItem.subMenu.forEach(function(subItem) {
|
currentItem.subMenu?.forEach(function(subItem) {
|
||||||
subItem.stateRef && result.push(subItem.stateRef);
|
subItem.stateRef && result.push(subItem.stateRef);
|
||||||
_iterateSubItems(subItem);
|
_iterateSubItems(subItem);
|
||||||
});
|
});
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
function BaSidebarTogglingItemCtrl($scope, $element, $attrs, $state, baSidebarService) {
|
function BaSidebarTogglingItemCtrl($scope, $element, $attrs, $state, baSidebarService) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
var menuItem = vm.$$menuItem = $scope.$eval($attrs.baSidebarTogglingItem);
|
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.$$expandSubmenu = function() { console.warn('$$expandMenu should be overwritten by baUiSrefTogglingSubmenu') };
|
||||||
vm.$$collapseSubmenu = function() { console.warn('$$collapseSubmenu should be overwritten by baUiSrefTogglingSubmenu') };
|
vm.$$collapseSubmenu = function() { console.warn('$$collapseSubmenu should be overwritten by baUiSrefTogglingSubmenu') };
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
$scope.form && $scope.form.$setSubmitted(true);
|
$scope.form?.$setSubmitted(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isComplete() {
|
function isComplete() {
|
||||||
|
|
Loading…
Reference in New Issue