r99244 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99243‎ | r99244 | r99245 >
Date:19:49, 7 October 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/parsers/wikidom/lib/qunit.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/qunit.js
@@ -1268,8 +1268,10 @@
12691269 type = "document";
12701270 } else if (obj.nodeType) {
12711271 type = "node";
1272 - } else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) {
 1272+ } else if (Object.prototype.toString.call( obj ) == "[object Array]") {
12731273 type = "array";
 1274+ } else if (Object.prototype.toString.call( obj ) == "[object NodeList]") {
 1275+ type = "array";
12741276 } else {
12751277 type = typeof obj;
12761278 }

Status & tagging log