From c63ff06453f8a4a8c9cf280ce37b25c96ed4d8a4 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Fri, 8 Mar 2019 21:19:28 -0500 Subject: [PATCH] Using native fetch on supported browsers --- package.json | 2 +- src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index abe7cfd..ca4dcdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/secure-file-wrapper", - "version": "2.3.2", + "version": "2.3.3", "main": "lib/index.js", "author": "Fabian Stamm ", "license": "MIT", diff --git a/src/index.ts b/src/index.ts index 4c62a8e..c3ef6e3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import { Observable, Lock } from "@hibas123/utils"; -import fetch from "cross-fetch" +//this references global on node and window in browser +const fetch = this.fetch ? this.fetch : require("cross-fetch").default; export interface IFileVersion { version: string;