From 1487c3a9947b0eb55c61b5d93ff9f0c69a812aeb Mon Sep 17 00:00:00 2001 From: Johann-S Date: Mon, 23 Oct 2017 09:35:27 +0200 Subject: Add `Util.jQuery` which will detect jQuery instead of relying on global `$` (#24513) --- js/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/index.js') diff --git a/js/src/index.js b/js/src/index.js index f30b94c57..1697a709b 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -33,7 +33,7 @@ import Util from './util' if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0') } -})($) +})(Util.jQuery) export { Util, -- cgit v1.2.3 From 62fbb23ee61999e362cd8ade6073732a46466077 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Tue, 24 Oct 2017 10:12:45 +0200 Subject: Change Rollup config to wrap our dist files with jQuery instead of $ --- js/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/src/index.js') diff --git a/js/src/index.js b/js/src/index.js index 1697a709b..51d09b4e2 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -18,7 +18,7 @@ import Util from './util' * -------------------------------------------------------------------------- */ -(() => { +(($) => { if (typeof $ === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.') } @@ -33,7 +33,7 @@ import Util from './util' if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0') } -})(Util.jQuery) +})($) export { Util, -- cgit v1.2.3