Skip to content

Commit

Permalink
Merge pull request #34 from firstandthird/bug/find-node
Browse files Browse the repository at this point in the history
Adding `Node` to the find lib
  • Loading branch information
Antonio-Laguna authored Mar 9, 2017
2 parents 78ba7d6 + 99db1a5 commit 7df0cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import findOne from './findOne';
import isWindow from './isWindow';

function find(selector, context = null) {
if (selector instanceof HTMLElement || isWindow(selector)) {
if (selector instanceof HTMLElement || selector instanceof Node || isWindow(selector)) {
return [selector];
} else if (selector instanceof NodeList) {
return [].slice.call(selector);
Expand Down

0 comments on commit 7df0cce

Please sign in to comment.