]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Regroup our jQuery check in the same IIFE
authorJohann-S <johann.servoire@gmail.com>
Thu, 31 Aug 2017 17:19:10 +0000 (19:19 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 31 Aug 2017 17:54:15 +0000 (20:54 +0300)
js/src/index.js

index a3858dd24b48c4c4c0668ac437227aed892d950e..84a27880e97c7b8898450527cfc1813da1acccce 100644 (file)
@@ -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