1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-08 13:00:05 +00:00

fix(*): use fetch polyfill for Firefox versions older than 60

This commit is contained in:
Krishna Acondy
2020-08-13 21:46:08 +01:00
parent 870cc0055b
commit 59674744be
2 changed files with 9 additions and 5 deletions

View File

@@ -1,8 +1,12 @@
export function isIEorEdgeOrFirefox60() {
export function isIEorEdgeOrOldFirefox() {
const ua = window.navigator.userAgent;
if (ua.indexOf("Firefox/60") > 0) {
return true;
if (ua.indexOf("Firefox") > 0) {
const version = parseInt(
ua.substring(ua.lastIndexOf("Firefox/") + 8, ua.length),
10
);
return version <= 60;
}
const msie = ua.indexOf("MSIE ");