MDL-68409 js: Fix eslint failure in modal
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 14 Apr 2020 00:57:05 +0000 (08:57 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 4 May 2020 07:07:48 +0000 (15:07 +0800)
lib/amd/build/modal.min.js
lib/amd/build/modal.min.js.map
lib/amd/src/modal.js

index dd36781..642c2ed 100644 (file)
Binary files a/lib/amd/build/modal.min.js and b/lib/amd/build/modal.min.js differ
index f34fc87..cb5d00f 100644 (file)
Binary files a/lib/amd/build/modal.min.js.map and b/lib/amd/build/modal.min.js.map differ
index 279d4f7..154f974 100644 (file)
@@ -610,10 +610,11 @@ define([
      * already been.
      *
      * @method show
+     * @returns {Promise}
      */
     Modal.prototype.show = function() {
         if (this.isVisible()) {
-            return;
+            return $.Deferred().resolve();
         }
 
         var pendingPromise = new Pending('core/modal:show');
@@ -628,7 +629,7 @@ define([
             this.attachToDOM();
         }
 
-        this.getBackdrop()
+        return this.getBackdrop()
         .then(function(backdrop) {
             var currentIndex = this.calculateZIndex();
             var newIndex = currentIndex + 2;