#48 Fixes in storageProvider

This commit is contained in:
Serraniel 2020-12-29 16:59:28 +01:00
parent 421c191e1d
commit 71c5b6ae55
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -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;
}