Skip to content
Browse files

Always call getElementById on the document

  • Loading branch information...
1 parent 5863424 commit a7836105ab90280c5876b812efbf0c52cc9954f6 @fgnass committed Feb 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/select.js
View
2 lib/select.js
@@ -394,7 +394,7 @@ function select(sel, context) {
module.exports = exports = function(sel, context) {
if (!~sel.indexOf(' ')) {
if (sel[0] === '#' && /^#\w+$/.test(sel)) {
- return [context.getElementById(sel.substring(1))];
+ return [context.doc.getElementById(sel.substring(1))];
}
if (sel[0] === '.' && /^\.\w+$/.test(sel)) {
return context.getElementsByClassName(sel.substring(1));

0 comments on commit a783610

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