Fix scoping in r112451: isReady was accidentally used as a global variable
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 28 Feb 2012 02:36:29 +0000 (02:36 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 28 Feb 2012 02:36:29 +0000 (02:36 +0000)
resources/mediawiki.action/mediawiki.action.edit.js

index c5e38ff..6b10485 100644 (file)
@@ -9,7 +9,7 @@
                // If you want to add buttons, use
                // mw.toolbar.addButton( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId, selectText );
                addButton : function() {
-                       if ( isReady ) {
+                       if ( this.isReady ) {
                                this.insertButton.apply( this, arguments );
                        } else {
                                this.buttons.push( [].slice.call( arguments ) );
@@ -48,7 +48,7 @@
 
                onReady : function() {
                        this.$toolbar = $( '#toolbar' );
-                       isReady = true;
+                       this.isReady = true;
                        // Legacy
                        // Merge buttons from mwCustomEditButtons
                        var buttons = [].concat( this.buttons, window.mwCustomEditButtons );