Skip to content

Commit

Permalink
fix(popup): make popups play nice with other async popups
Browse files Browse the repository at this point in the history
Closes #4118
  • Loading branch information
zittix authored and mhartington committed Oct 14, 2015
1 parent 4e9f875 commit 6101d4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/angular/service/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
popupStack.splice(index, 1);
}

popup.remove();

if (popupStack.length > 0) {
popupStack[popupStack.length - 1].show();
} else {
Expand All @@ -418,7 +420,6 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
($ionicPopup._backButtonActionDone || noop)();
}

popup.remove();

return result;
});
Expand Down

1 comment on commit 6101d4b

@zero7u
Copy link

@zero7u zero7u commented on 6101d4b Oct 22, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You fixed it before I found the bug, thanks.

Please sign in to comment.