diff options
Diffstat (limited to 'js/src')
| -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 2629e507f..f30b94c57 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') } })($) |
