r108160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108159‎ | r108160 | r108161 >
Date:18:39, 5 January 2012
Author:preilly
Status:ok
Tags:
Comment:
[Bug 33547] New: Toggling last section in MobileFrontend shows JS error
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/application.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/application.js
@@ -116,7 +116,10 @@
117117 s.display = s.display == 'none' || ( i && !s.display ) ? 'inline-block' : 'none';
118118 }
119119 for ( var i = 0, d = ['content_','anchor_']; i<=1; i++ ) {
120 - var s = document.getElementById( d[i] + section_id ).style;
121 - s.display = s.display == 'block' ? 'none' : 'block';
 120+ var e = document.getElementById( d[i] + section_id );
 121+
 122+ if ( e ) {
 123+ e.style.display = e.style.display == 'block' ? 'none' : 'block';
 124+ }
122125 }
123126 }
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r1081611.18wmf1: MFT r108160preilly18:42, 5 January 2012

Status & tagging log