From: Johann-S Date: Thu, 31 Aug 2017 17:19:10 +0000 (+0200) Subject: Regroup our jQuery check in the same IIFE X-Git-Tag: v4.0.0-beta.2~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4667be152a3a4fed4e42f2a9efbf831bb5946b6;p=thirdparty%2Fbootstrap.git Regroup our jQuery check in the same IIFE --- diff --git a/js/src/index.js b/js/src/index.js index a3858dd24b..84a27880e9 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -18,11 +18,11 @@ import Util from './util' * -------------------------------------------------------------------------- */ -if (typeof jQuery === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.') -} - (() => { + if (typeof jQuery === 'undefined') { + throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.') + } + const version = $.fn.jquery.split(' ')[0].split('.') const min = 3 const max = 4