r86841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86840‎ | r86841 | r86842 >
Date:10:17, 25 April 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r86625: per CR, use loose comparison against null instead of typeof foo != 'undefined' because jQuery 1.4 (which MW uses) actually returns null for unset .data() keys, but 1.5 returns undefined.
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.collapsibleTabs.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.collapsibleTabs.js
@@ -49,7 +49,7 @@
5050 },
5151 addData: function( $collapsible ) {
5252 var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' );
53 - if ( typeof $settings != 'undefined' ) {
 53+ if ( $settings != null ) {
5454 $collapsible.data( 'collapsibleTabsSettings', {
5555 'expandedContainer': $settings.expandedContainer,
5656 'collapsedContainer': $settings.collapsedContainer,
@@ -114,4 +114,4 @@
115115 $.collapsibleTabs.handleResize();
116116 }
117117 };
118 -} )( jQuery );
\ No newline at end of file
 118+} )( jQuery );

Follow-up revisions

RevisionCommit summaryAuthorDate
r871701.17: MFT r85546, r86450, r86625, r86805, r86841, r86904, r86973, r87030catrope16:57, 30 April 2011
r873531.17wmf1: MFT r85546, r86409, r86450, r86625, r86788, r86805, r86841, r86904,...catrope20:27, 3 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86625(bug 27833) CollapsibleTabs doesn't collapse tabs due to JS errors...catrope14:39, 21 April 2011

Status & tagging log