r44174 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44173‎ | r44174 | r44175 >
Date:15:26, 3 December 2008
Author:werdna
Status:ok
Tags:
Comment:
JS tweaks
Modified paths:
  • /trunk/extensions/Configure/Configure.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.js
@@ -318,7 +318,12 @@
319319 var fieldset_title = getInnerText( fieldset.getElementsByTagName( 'legend' )[0] );
320320 var subsections = getElementsByClassName( fieldset, 'table', 'configure-table' );
321321 for( var sid=0;sid<subsections.length;++sid ) {
322 - var subsection = subsections[sid].getElementsByTagName( 'tbody' )[0];
 322+ var subsection;
 323+ if (subsections[sid].getElementsByTagName( 'tbody' ).length > 0) {
 324+ subsection = subsections[sid].getElementsByTagName( 'tbody' )[0];
 325+ } else {
 326+ subsection = subsections[sid];
 327+ }
323328 var heading = document.getElementById( subsection.parentNode.id.replace( 'config-table', 'config-head' ) );
324329
325330 // For each setting...

Status & tagging log