fix(jqLite): convert NodeList to an Array to make PhantomJS 1.x happy

Closes #7851
This commit is contained in:
Igor Minar
2014-06-23 21:58:38 -07:00
parent b1a6baac2d
commit ceaea861eb

View File

@@ -385,6 +385,10 @@ function jqLiteAddNodes(root, elements) {
// if an Array or NodeList and not a Window
if (typeof length === 'number' && elements.window !== elements) {
if (length) {
if (elements.item) {
// convert NodeList to an Array to make PhantomJS 1.x happy
elements = slice.call(elements);
}
push.apply(root, elements);
}
} else {