From: Heinrich Fenkart Date: Wed, 26 Feb 2014 01:04:38 +0000 (+0100) Subject: Fix #12845 - Modal#hide should only be called with an event argument X-Git-Tag: v3.2.0~353^2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e4e4563418e44a2f73c6a4ec4299105824f7eda;p=thirdparty%2Fbootstrap.git Fix #12845 - Modal#hide should only be called with an event argument Closes #12850 --- diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 1bf7ffafa9..b9ae0fc11f 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -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) { diff --git a/js/modal.js b/js/modal.js index 454d7d57a3..ec358696ff 100644 --- a/js/modal.js +++ b/js/modal.js @@ -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) {