Merge pull request #2313 from dmitrylyzo/fix-safari-tizen

Fix browser detection: Safari vs Tizen
This commit is contained in:
Bill Thornton 2021-01-07 16:50:17 -05:00 committed by GitHub
commit 41cfd7f412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,9 @@ browser.edgeUwp = browser.edge && (userAgent.toLowerCase().indexOf('msapphost')
if (!browser.tizen) {
browser.orsay = userAgent.toLowerCase().indexOf('smarthub') !== -1;
} else {
// UserAgent string contains 'Safari' and 'safari' is set by matched browser, but we only want 'tizen' to be true
delete browser.safari;
const v = (navigator.appVersion).match(/Tizen (\d+).(\d+)/);
browser.tizenVersion = parseInt(v[1]);
}