]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix #12845 - Modal#hide should only be called with an event argument
authorHeinrich Fenkart <hnrch02@gmail.com>
Wed, 26 Feb 2014 01:04:38 +0000 (02:04 +0100)
committerChris Rebert <code@rebertia.com>
Mon, 17 Mar 2014 03:24:33 +0000 (20:24 -0700)
Closes #12850

dist/js/bootstrap.js
js/modal.js

index 1bf7ffafa9550bfcb35842fbb8ae009a26525e6f..b9ae0fc11fca589edac852c2699d1a9083df6c3c 100644 (file)
@@ -817,7 +817,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
   }
 
   Modal.prototype.toggle = function (_relatedTarget) {
-    return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
+    return this.isShown ? this.hide() : this.show(_relatedTarget)
   }
 
   Modal.prototype.show = function (_relatedTarget) {
index 454d7d57a35bc7371372b6d065eb4936a4c47178..ec358696ff9b048c389c29112164679350bb081c 100644 (file)
@@ -36,7 +36,7 @@
   }
 
   Modal.prototype.toggle = function (_relatedTarget) {
-    return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
+    return this.isShown ? this.hide() : this.show(_relatedTarget)
   }
 
   Modal.prototype.show = function (_relatedTarget) {