From 3493f8e81f5d7bfac2ae7ba1e49228f30955bda2 Mon Sep 17 00:00:00 2001 From: axten Date: Thu, 6 Jun 2019 10:27:30 +0200 Subject: [PATCH] Don't override Dom7 methods if already declared 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). --- src/utils/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/dom.js b/src/utils/dom.js index cad5f658a..58e6b85d6 100644 --- a/src/utils/dom.js +++ b/src/utils/dom.js @@ -80,7 +80,7 @@ const Methods = { }; Object.keys(Methods).forEach((methodName) => { - $.fn[methodName] = Methods[methodName]; + $.fn[methodName] = $.fn[methodName] || Methods[methodName]; }); export default $;