Browse files

Fix edge case in which uninitialized buttons are being destroyed.

In certain cases, the button may not yet be initialized or may no longer have button properties at the time of removal from the DOM. Without this check, an uncaught exception is thrown.
  • Loading branch information...
1 parent 9b3aebd commit 07fb7563273fa82bd93eb25570571c0a298198e5 @unclecheese unclecheese committed Dec 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 admin/javascript/LeftAndMain.js
@@ -575,7 +575,7 @@ jQuery.noConflict();
onremove: function() {
- this.button('destroy');
+ if('button')) this.button('destroy');

0 comments on commit 07fb756

Please sign in to comment.