Skip to content

Commit

Permalink
Merge pull request #29 from konstantina89f/patch-1
Browse files Browse the repository at this point in the history
fix(selectors): internet explorer 10
  • Loading branch information
lucaperret authored May 15, 2018
2 parents 924e90b + b2e5ea5 commit 89f92ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* Returns a collection of matched elements either found in the DOM based on passed argument
*
* @param {string} selector Accepts a string containing a CSS selector which is then used to match a set of elements
* @param {(HTMLDocument|Element)} [context=document] A DOM Element or Document
* @param {(Document|Element)} [context=document] A DOM Element or Document
* @return {Array} A collection of DOM Elements
*/
export function find (selector, context = document) {
if (context instanceof Element === false && context instanceof HTMLDocument === false) {
if (context instanceof Element === false && context instanceof Document === false) {
throw new TypeError('You should provide a valid dom node as second argument')
}
let elements
Expand Down

0 comments on commit 89f92ed

Please sign in to comment.