Skip to content

Commit

Permalink
fix(utils): add defence code
Browse files Browse the repository at this point in the history
in case of mutiple jQuery instnaces on a document.

ref naver/egjs-axes#11
  • Loading branch information
sculove committed Jun 7, 2017
1 parent 8c86886 commit 64b2e47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const utils = {
}
} else if (param.nodeName && param.nodeType === 1) { // HTMLElement
el = param;
} else if (window.jQuery && (param instanceof jQuery)) { // jQuery
} else if ((window.jQuery && param instanceof jQuery) || param.constructor.prototype.jquery) { // jQuery
el = multi ? param.toArray() : param.get(0);
} else if (Array.isArray(param)) {
el = param.map(v => utils.$(v));
Expand Down

0 comments on commit 64b2e47

Please sign in to comment.