From d763d019ad3f61bb78c85f9dc2f7b842c8357e71 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 19 Oct 2017 19:02:27 +0300 Subject: Make 1.9.1 the minimum jQuery version again. (#24434) --- js/src/index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'js/src/index.js') 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') } })($) -- cgit v1.2.3