mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 15:44:51 +02:00
Make 1.9.1 the minimum jQuery version again. (#24434)
This commit is contained in:
@@ -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')
|
||||
}
|
||||
})($)
|
||||
|
||||
|
Reference in New Issue
Block a user