From 31f2ed6de81ebbf20d4411674c40d32a20d7252a Mon Sep 17 00:00:00 2001 From: Nazar Date: Thu, 19 Dec 2019 17:44:51 +0200 Subject: [PATCH] add check for jQuery if it is not defined (#586) Bugfix --- js/ion.rangeSlider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js index 1d6bd03..e7d1ad5 100644 --- a/js/ion.rangeSlider.js +++ b/js/ion.rangeSlider.js @@ -11,11 +11,11 @@ // ===================================================================================================================== ;(function(factory) { - if (!jQuery && typeof define === "function" && define.amd) { + if ((typeof jQuery === 'undefined' || !jQuery) && typeof define === "function" && define.amd) { define(["jquery"], function (jQuery) { return factory(jQuery, document, window, navigator); }); - } else if (!jQuery && typeof exports === "object") { + } else if ((typeof jQuery === 'undefined' || !jQuery) && typeof exports === "object") { factory(require("jquery"), document, window, navigator); } else { factory(jQuery, document, window, navigator); @@ -806,7 +806,7 @@ if ($.contains(this.$cache.cont[0], e.target) || this.dragging) { this.callOnFinish(); } - + this.dragging = false; },