Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix incorrect var handling

  • Loading branch information...
commit addab28b60aa9ee217cfe9be63d58eb589b133c1 1 parent 2587254
Andrew McCollum authored October 02, 2012
5  lib/sel.js
@@ -796,7 +796,7 @@
796 796
         return roots.map(function(root) {
797 797
           return qSA(selector, root);
798 798
         }).reduce(extend, []);
799  
-      } catch (e) {
  799
+      } catch (err) {
800 800
 
801 801
       }
802 802
     }
@@ -848,6 +848,7 @@
848 848
   matchesSelector = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
849 849
   matchesDisconnected = matchesSelector && matchesSelector.call(document.createElement('div'), 'div');
850 850
   sel.matching = matching = function(els, selector) {
  851
+    var e;
851 852
     if (matchesSelector && (matchesDisconnected || els.every(function(el) {
852 853
       return el.document && el.document.nodeType !== 11;
853 854
     }))) {
@@ -855,7 +856,7 @@
855 856
         return els.filter(function(el) {
856 857
           return matchesSelector.call(el, selector);
857 858
         });
858  
-      } catch (e) {
  859
+      } catch (err) {
859 860
 
860 861
       }
861 862
     }
2  package.json
... ...
@@ -1,6 +1,6 @@
1 1
 {
2 2
     "name": "sel",
3  
-    "version": "0.7.4",
  3
+    "version": "0.7.5",
4 4
     "description": "Small, fast CSS4 selector library",
5 5
     "keywords": ["ender", "css", "css4", "selector engine", "jquery", "sizzle"],
6 6
     "author": "Andrew McCollum <amccollum@gmail.com>",
2  src/sel/matching.coffee
@@ -5,7 +5,7 @@
5 5
         if matchesSelector and (matchesDisconnected or els.every((el) -> el.document and el.document.nodeType != 11))
6 6
             try
7 7
                 return els.filter((el) -> matchesSelector.call(el, selector))
8  
-            catch e
  8
+            catch err
9 9
     
10 10
         e = parse(selector)
11 11
         if not e.child and not e.children and not e.pseudos
4  src/sel/sel.coffee
@@ -754,7 +754,7 @@
754 754
                 if not matchRoots and not combinatorPattern.exec(selector)
755 755
                     try
756 756
                         return roots.map((root) -> qSA(selector, root)).reduce(extend, [])
757  
-                    catch e
  757
+                    catch err
758 758
 
759 759
                 return evaluate(parse(selector), roots, matchRoots)
760 760
             
@@ -815,7 +815,7 @@
815 815
         if matchesSelector and (matchesDisconnected or els.every((el) -> el.document and el.document.nodeType != 11))
816 816
             try
817 817
                 return els.filter((el) -> matchesSelector.call(el, selector))
818  
-            catch e
  818
+            catch err
819 819
     
820 820
         e = parse(selector)
821 821
         if not e.child and not e.children and not e.pseudos
2  src/sel/select.coffee
@@ -44,7 +44,7 @@
44 44
                 if not matchRoots and not combinatorPattern.exec(selector)
45 45
                     try
46 46
                         return roots.map((root) -> qSA(selector, root)).reduce(extend, [])
47  
-                    catch e
  47
+                    catch err
48 48
 
49 49
                 return evaluate(parse(selector), roots, matchRoots)
50 50
             

0 notes on commit addab28

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