Skip to content

Commit

Permalink
Merge branch 'perf/remove-slice' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Frikki committed Dec 7, 2015
2 parents 8dd9729 + 31ad84f commit a4d1218
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ function makeElementSelector(rootElem$) {
return [element]
} else {
let nodeList = element.querySelectorAll(scopedSelector)
return Array.prototype.slice.call(nodeList)
const nodeListArray = new Array(nodeList.length)
for (let j = 0; j < nodeListArray.length; j++) {
nodeListArray[j] = nodeList[j]
}
return nodeListArray
}
}
),
Expand Down

0 comments on commit a4d1218

Please sign in to comment.