Skip to content

Commit

Permalink
Don't override Dom7 methods if already declared
Browse files Browse the repository at this point in the history
I'm using dom7 modular in a project together with swiper and patched some methods to be more jquery compatible (e.g. added second argument for toggleClass).
  • Loading branch information
axten authored Jun 6, 2019
1 parent 8d0dd34 commit 3493f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Methods = {
};

Object.keys(Methods).forEach((methodName) => {
$.fn[methodName] = Methods[methodName];
$.fn[methodName] = $.fn[methodName] || Methods[methodName];
});

export default $;

0 comments on commit 3493f8e

Please sign in to comment.