See the url above for the usecase.
In that case the nodeList is an array having only one element which is undefined.
The error can be avoided by changing the line[1]
element = nodeList[i];
to something like:
element = nodeList[i]; if (!element) { continue; }
[1] On this loop:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/wikibits.js?annotate=91660#l230
Version: 1.17.x
Severity: normal
URL: https://secure.wikimedia.org/wikibooks/en/w/index.php?title=MediaWiki_talk:Common.js&oldid=2155725&diff=prev