aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2019-08-02 15:51:05 +0200
committerJohann-S <[email protected]>2019-08-02 16:50:05 +0200
commit8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65 (patch)
treefca5d7d55bb5f2932eda48f4594b4a839b0a8987 /js/src/modal
parent1ebb8e7d9b4bd52c7fc088aeaec12ab9bcb240c6 (diff)
downloadbootstrap-8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65.tar.xz
bootstrap-8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65.zip
add a way to disable jQuery detection
Diffstat (limited to 'js/src/modal')
-rw-r--r--js/src/modal/modal.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/modal/modal.js b/js/src/modal/modal.js
index fd24b7768..4864cad9d 100644
--- a/js/src/modal/modal.js
+++ b/js/src/modal/modal.js
@@ -6,7 +6,7 @@
*/
import {
- jQuery as $,
+ getjQuery,
TRANSITION_END,
emulateTransitionEnd,
getElementFromSelector,
@@ -582,6 +582,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (
data.show(this)
})
+const $ = getjQuery()
+
/**
* ------------------------------------------------------------------------
* jQuery
@@ -589,7 +591,7 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (
* add .modal to jQuery only if jQuery is present
*/
/* istanbul ignore if */
-if (typeof $ !== 'undefined') {
+if ($) {
const JQUERY_NO_CONFLICT = $.fn[NAME]
$.fn[NAME] = Modal.jQueryInterface
$.fn[NAME].Constructor = Modal