1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Fix strict mode logic

This commit is contained in:
Nir Rattner
2016-07-06 17:01:02 -04:00
parent bb200a8fb0
commit 65dfb0918c
2 changed files with 13 additions and 5 deletions

View File

@@ -524,9 +524,7 @@
if (minVersions.hasOwnProperty(browser)) {
if (_bowser[browser]) {
// browser version and min supported version.
if (compareVersions([version, minVersions[browser]]) < 0) {
return true; // unsupported
}
return compareVersions([version, minVersions[browser]]) < 0;
}
}
}
@@ -540,8 +538,8 @@
* @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map
* @return {Boolean}
*/
function check(minVersions, strictMode) {
return !isUnsupportedBrowser(minVersions, strictMode);
function check(minVersions, strictMode, ua) {
return !isUnsupportedBrowser(minVersions, strictMode, ua);
}
bowser.isUnsupportedBrowser = isUnsupportedBrowser;