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

Commit

Permalink
fix(jqLite): convert NodeList to an Array to make PhantomJS 1.x happy
Browse files Browse the repository at this point in the history
Closes #7851
  • Loading branch information
IgorMinar committed Jun 24, 2014
1 parent b1a6baa commit ceaea86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jqLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ceaea86

Please sign in to comment.