improving browser detection
This commit is contained in:
parent
c63ff06453
commit
92dba5274e
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/secure-file-wrapper",
|
"name": "@hibas123/secure-file-wrapper",
|
||||||
"version": "2.3.3",
|
"version": "2.3.4",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Observable, Lock } from "@hibas123/utils";
|
import { Observable, Lock } from "@hibas123/utils";
|
||||||
//this references global on node and window in browser
|
//this references global on node and window in browser
|
||||||
const fetch = this.fetch ? this.fetch : require("cross-fetch").default;
|
const fetch = typeof window !== "undefined" && typeof window.fetch !== undefined ? window.fetch : require("cross-fetch").default;
|
||||||
|
|
||||||
export interface IFileVersion {
|
export interface IFileVersion {
|
||||||
version: string;
|
version: string;
|
||||||
|
Reference in New Issue
Block a user