r90083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90082‎ | r90083 | r90084 >
Date:20:55, 14 June 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Followup to r86942 per CR comments: instanceof Array -> $.isArray (safer, more cross-browser)
Modified paths:
  • /trunk/phase3/resources/mediawiki.action/mediawiki.action.edit.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.edit.js
@@ -42,7 +42,7 @@
4343 // Merge buttons from mwCustomEditButtons
4444 var buttons = [].concat( this.buttons, window.mwCustomEditButtons );
4545 for ( var i = 0; i < buttons.length; i++ ) {
46 - if ( buttons[i] instanceof Array ) {
 46+ if ( $.isArray( buttons[i] ) ) {
4747 // Passes our button array as arguments
4848 mw.toolbar.insertButton.apply( this, buttons[i] );
4949 } else {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86942Followup to r86603 per Bug 28681 : Create public array mw.toolbar.buttons. Us...diebuche10:08, 26 April 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   20:57, 14 June 2011

Merge for 1.18 (updates from CR)

Status & tagging log