Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ceaea86

Browse files
committed
fix(jqLite): convert NodeList to an Array to make PhantomJS 1.x happy
Closes #7851
1 parent b1a6baa commit ceaea86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jqLite.js

+4
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ function jqLiteAddNodes(root, elements) {
385385
// if an Array or NodeList and not a Window
386386
if (typeof length === 'number' && elements.window !== elements) {
387387
if (length) {
388+
if (elements.item) {
389+
// convert NodeList to an Array to make PhantomJS 1.x happy
390+
elements = slice.call(elements);
391+
}
388392
push.apply(root, elements);
389393
}
390394
} else {

0 commit comments

Comments
 (0)