Index: trunk/parsers/wikidom/lib/qunit.js |
— | — | @@ -1268,8 +1268,10 @@ |
1269 | 1269 | type = "document"; |
1270 | 1270 | } else if (obj.nodeType) { |
1271 | 1271 | 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]") { |
1273 | 1273 | type = "array"; |
| 1274 | + } else if (Object.prototype.toString.call( obj ) == "[object NodeList]") { |
| 1275 | + type = "array"; |
1274 | 1276 | } else { |
1275 | 1277 | type = typeof obj; |
1276 | 1278 | } |