From 46072da99199926910803ac3025dc5170d9c5fe1 Mon Sep 17 00:00:00 2001 From: "Fabio M. Costa" Date: Thu, 29 Apr 2010 23:21:23 -0300 Subject: [PATCH] avoids touching className twice. --- Source/Slick.Finder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Slick.Finder.js b/Source/Slick.Finder.js index 12a657ca..2916ca12 100644 --- a/Source/Slick.Finder.js +++ b/Source/Slick.Finder.js @@ -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); }