Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix incorrect var handling

  • Loading branch information...
commit addab28b60aa9ee217cfe9be63d58eb589b133c1 1 parent 2587254
@amccollum authored
View
5 lib/sel.js
@@ -796,7 +796,7 @@
return roots.map(function(root) {
return qSA(selector, root);
}).reduce(extend, []);
- } catch (e) {
+ } catch (err) {
}
}
@@ -848,6 +848,7 @@
matchesSelector = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
matchesDisconnected = matchesSelector && matchesSelector.call(document.createElement('div'), 'div');
sel.matching = matching = function(els, selector) {
+ var e;
if (matchesSelector && (matchesDisconnected || els.every(function(el) {
return el.document && el.document.nodeType !== 11;
}))) {
@@ -855,7 +856,7 @@
return els.filter(function(el) {
return matchesSelector.call(el, selector);
});
- } catch (e) {
+ } catch (err) {
}
}
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "sel",
- "version": "0.7.4",
+ "version": "0.7.5",
"description": "Small, fast CSS4 selector library",
"keywords": ["ender", "css", "css4", "selector engine", "jquery", "sizzle"],
"author": "Andrew McCollum <amccollum@gmail.com>",
View
2  src/sel/matching.coffee
@@ -5,7 +5,7 @@
if matchesSelector and (matchesDisconnected or els.every((el) -> el.document and el.document.nodeType != 11))
try
return els.filter((el) -> matchesSelector.call(el, selector))
- catch e
+ catch err
e = parse(selector)
if not e.child and not e.children and not e.pseudos
View
4 src/sel/sel.coffee
@@ -754,7 +754,7 @@
if not matchRoots and not combinatorPattern.exec(selector)
try
return roots.map((root) -> qSA(selector, root)).reduce(extend, [])
- catch e
+ catch err
return evaluate(parse(selector), roots, matchRoots)
@@ -815,7 +815,7 @@
if matchesSelector and (matchesDisconnected or els.every((el) -> el.document and el.document.nodeType != 11))
try
return els.filter((el) -> matchesSelector.call(el, selector))
- catch e
+ catch err
e = parse(selector)
if not e.child and not e.children and not e.pseudos
View
2  src/sel/select.coffee
@@ -44,7 +44,7 @@
if not matchRoots and not combinatorPattern.exec(selector)
try
return roots.map((root) -> qSA(selector, root)).reduce(extend, [])
- catch e
+ catch err
return evaluate(parse(selector), roots, matchRoots)
Please sign in to comment.
Something went wrong with that request. Please try again.