Skip to content

Commit d541ece

Browse files
committed
added bug fix for hide-before-show bug
this commit fixes a bug where .modal('hide') is called on a modal object before .modal('show'). this can be viewed here: http://jsfiddle.net/aaronj1335/7hH89/8/ (notice the JS exception that is thrown)
1 parent 68605bd commit d541ece

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

js/bootstrap-modal.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
, hide: function (e) {
101101
e && e.preventDefault()
102102

103+
if (! this.isShown) return
104+
103105
var that = this
104106
this.isShown = false
105107

@@ -235,4 +237,4 @@
235237
})
236238
})
237239

238-
}( window.jQuery || window.ender );
240+
}( window.jQuery || window.ender );

0 commit comments

Comments
 (0)