Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.

Commit cab9fd4

Browse files
committed
fix(modal): fix the wrong condition of modalStack
1 parent 1b7414f commit cab9fd4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

js/angular/service/modal.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,10 @@ function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTempl
240240
if (self.positionView) {
241241
ionic.off('resize', self._onWindowResize, window);
242242
}
243-
243+
244+
var isModalStackNotEmpty = modalStack.length > 0;
244245
return $timeout(function() {
245-
if (!modalStack.length) {
246-
$ionicBody.removeClass(self.viewType + '-open');
247-
}
246+
isModalStackNotEmpty && $ionicBody.removeClass(self.viewType + '-open');
248247
self.el.classList.add('hide');
249248
}, self.hideDelay || 320);
250249
},

0 commit comments

Comments
 (0)