Skip to content

Commit

Permalink
avoids touching className twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiomcosta committed Apr 30, 2010
1 parent 56b5336 commit 46072da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Slick.Finder.js
Expand Up @@ -731,7 +731,8 @@ local.override(/^\.[\w-]+$/, function(expression, found, first){ // class overri
var matchClass = new RegExp('(^|\\s)'+ Slick.escapeRegExp(className) +'(\\s|$)');
nodes = this.getElementsByTagName('*');
for (i = 0; node = nodes[i++];){
if (!node.className || !matchClass.test(node.className)) continue;
className = node.className;
if (!className || !matchClass.test(className)) continue;
if (first) return node;
if (!hasOthers || !local.uniques[local.getUIDHTML(node)]) found.push(node);
}
Expand Down

0 comments on commit 46072da

Please sign in to comment.