1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

build fix

This commit is contained in:
Matthias Kretschmann 2020-09-10 13:50:16 +02:00
parent 9ae58d45ec
commit 466f04c86d
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -22,13 +22,14 @@ const localStorageKey = 'ocean-user-preferences'
function getLocalStorage() { function getLocalStorage() {
const storageParsed = const storageParsed =
window && JSON.parse(window.localStorage.getItem(localStorageKey)) window !== undefined &&
JSON.parse(window.localStorage.getItem(localStorageKey))
return storageParsed return storageParsed
} }
function setLocalStorage(values: UserPreferencesValue) { function setLocalStorage(values: UserPreferencesValue) {
return ( return (
window && window !== undefined &&
window.localStorage.setItem(localStorageKey, JSON.stringify(values)) window.localStorage.setItem(localStorageKey, JSON.stringify(values))
) )
} }