Skip to content

Commit

Permalink
IE8 strangely returns elements without the passed id while using .all…
Browse files Browse the repository at this point in the history
…, checking if it exists before checking its value.
  • Loading branch information
fabiomcosta committed Feb 23, 2011
1 parent 233dab9 commit 0ca58ca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/Slick.Finder.js
Expand Up @@ -618,9 +618,12 @@ var combinators = {
children = node.all[id];
if (!children) return;
if (!children[0]) children = [children];
for (i = 0; item = children[i++];) if (item.getAttributeNode('id').nodeValue == id){
this.push(item, tag, null, classes, attributes, pseudos);
break;
for (i = 0; item = children[i++];){
var idNode = item.getAttributeNode('id');
if (idNode && idNode.nodeValue == id){
this.push(item, tag, null, classes, attributes, pseudos);
break;
}
}
return;
}
Expand Down

0 comments on commit 0ca58ca

Please sign in to comment.