diff options
author | XhmikosR <xhmikosr@gmail.com> | 2017-10-19 19:02:27 +0300 |
---|---|---|
committer | Mark Otto <markd.otto@gmail.com> | 2017-10-19 19:02:27 +0300 |
commit | d763d019ad3f61bb78c85f9dc2f7b842c8357e71 (patch) | |
tree | 5d1ee36287fe858869128711035bd695e2e09c05 /js/src/index.js | |
parent | 0c67ab1fa67f85b34daf552ac3a709c80448886a (diff) |
Make 1.9.1 the minimum jQuery version again. (#24434)
Diffstat (limited to 'js/src/index.js')
-rw-r--r-- | js/src/index.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/src/index.js b/js/src/index.js index 2629e507fc..f30b94c576 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -24,10 +24,14 @@ import Util from './util' } const version = $.fn.jquery.split(' ')[0].split('.') - const min = 3 - const max = 4 - if (version[0] < min || version[0] >= max) { - throw new Error('Bootstrap\'s JavaScript requires at least jQuery v3.0.0 but less than v4.0.0') + const minMajor = 1 + const ltMajor = 2 + const minMinor = 9 + const minPatch = 1 + const maxMajor = 4 + + 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') } })($) |