Skip to content
Browse files

IE8 strangely returns elements without the passed id while using .all…

…, checking if it exists before checking its value.
  • Loading branch information...
1 parent 233dab9 commit 0ca58cac1e2ae0f4cfe3a957549b11403895c5b5 @fabiomcosta fabiomcosta committed Feb 23, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 Source/Slick.Finder.js
View
9 Source/Slick.Finder.js
@@ -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;
}

0 comments on commit 0ca58ca

Please sign in to comment.
Something went wrong with that request. Please try again.