Skip to content

Commit 7cf7e42

Browse files
committed
Merge branch 'hnrch02-modal-toggle'
2 parents fa4379d + 4e4e456 commit 7cf7e42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/js/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
817817
}
818818

819819
Modal.prototype.toggle = function (_relatedTarget) {
820-
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
820+
return this.isShown ? this.hide() : this.show(_relatedTarget)
821821
}
822822

823823
Modal.prototype.show = function (_relatedTarget) {

js/modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737

3838
Modal.prototype.toggle = function (_relatedTarget) {
39-
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
39+
return this.isShown ? this.hide() : this.show(_relatedTarget)
4040
}
4141

4242
Modal.prototype.show = function (_relatedTarget) {

0 commit comments

Comments
 (0)