MDL-63094 js: Do not check visibility before hiding backdrop

It's possible for the backdrop to be created during the show, before the
modal is actually fully shown.

This check is unnecessary because the getBackdrop() function always
returns a value and will always succeed.
This commit is contained in:
Andrew Nicols
2018-08-22 10:23:30 +08:00
parent 4b6780417e
commit 4d1a42fb7c
2 changed files with 1 additions and 5 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
-4
View File
@@ -577,10 +577,6 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
* @method hide
*/
Modal.prototype.hide = function() {
if (!this.isVisible()) {
return;
}
this.getBackdrop().done(function(backdrop) {
if (!this.countOtherVisibleModals()) {
// Hide the backdrop if we're the last open modal.