From 71c5b6ae55448d1db177a00b1650445502ba2a26 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Tue, 29 Dec 2020 16:59:28 +0100 Subject: [PATCH] #48 Fixes in storageProvider --- src/javascript/browserApi/storageProvider.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/javascript/browserApi/storageProvider.ts b/src/javascript/browserApi/storageProvider.ts index 61b8ef4..0a2f812 100644 --- a/src/javascript/browserApi/storageProvider.ts +++ b/src/javascript/browserApi/storageProvider.ts @@ -1,4 +1,4 @@ -const { assigned } = require("../utils/helpers") +import { assigned } from '../utils/helpers'; enum BrowserApi { Unknown, @@ -77,14 +77,14 @@ class StorageProviderFirefox implements ICustomBrowserStorageProvider { let __storageProvieder: ICustomBrowserStorageProvider; function getBrowserApi(): BrowserApi { - if (assigned(chrome)) { - if (assigned(browser)) { + if (typeof chrome !== 'undefined') { + if (typeof browser !== 'undefined') { return BrowserApi.Firefox; } return BrowserApi.Chromium; } - else if (assigned(browser)) { + else if (typeof browser !== 'undefined') { return BrowserApi.Firefox; }