prototype: Remove useless variable in Selector.handlers.child. Closes #10006.

This commit is contained in:
Tobie Langel 2007-11-15 22:21:08 +00:00
parent d20cc77e0c
commit c371096a71
2 changed files with 3 additions and 1 deletions

View File

@ -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]

View File

@ -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;