diff --git a/CHANGELOG b/CHANGELOG index 768b98e..c3fd9ee 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Remove useless variable in Selector.handlers.child. Closes #10006 [kuriyama] + * Don't redeclare previously declared variables. Closes #10007 [kuriyama] * For consistency: use Object.isUndefined where possible. [Tobie Langel] diff --git a/src/selector.js b/src/selector.js index 3bc72a7..d17eb3e 100644 --- a/src/selector.js +++ b/src/selector.js @@ -340,7 +340,7 @@ Object.extend(Selector, { child: function(nodes) { var h = Selector.handlers; for (var i = 0, results = [], node; node = nodes[i]; i++) { - for (var j = 0, children = [], child; child = node.childNodes[j]; j++) + for (var j = 0, child; child = node.childNodes[j]; j++) if (child.nodeType == 1 && child.tagName != '!') results.push(child); } return results;