mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 20:40:05 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8192f69f67 |
@@ -2,7 +2,9 @@ import { isIEorEdgeOrOldFirefox } from "./utils/isIeOrEdge";
|
|||||||
import * as e6p from "es6-promise";
|
import * as e6p from "es6-promise";
|
||||||
(e6p as any).polyfill();
|
(e6p as any).polyfill();
|
||||||
if (isIEorEdgeOrOldFirefox()) {
|
if (isIEorEdgeOrOldFirefox()) {
|
||||||
window.fetch = undefined as any; // ensure the polyfill runs
|
if (window) {
|
||||||
|
window.fetch = undefined as any; // ensure the polyfill runs
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// tslint:disable-next-line
|
// tslint:disable-next-line
|
||||||
require("isomorphic-fetch");
|
require("isomorphic-fetch");
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
export function isIEorEdgeOrOldFirefox() {
|
export function isIEorEdgeOrOldFirefox() {
|
||||||
|
if (typeof window === "undefined") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const ua = window.navigator.userAgent;
|
const ua = window.navigator.userAgent;
|
||||||
|
|
||||||
if (ua.indexOf("Firefox") > 0) {
|
if (ua.indexOf("Firefox") > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user