mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-08 17:10:06 +08:00
fix(jqLite): convert NodeList to an Array to make PhantomJS 1.x happy
Closes #7851
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user