1
0
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:
XhmikosR
2017-10-19 19:02:27 +03:00
committed by Mark Otto
parent 0c67ab1fa6
commit d763d019ad
3 changed files with 10 additions and 6 deletions

View File

@@ -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')
}
})($)