Commit 80e43c8c authored by Mark Harding's avatar Mark Harding

(fix): possible fix for localstorage access sentry FRONT-52

parent 6ad11c19
No related merge requests found
Pipeline #100275752 waiting for manual action with stages
in 50 minutes and 32 seconds
......@@ -4,7 +4,14 @@ export class Storage {
}
get(key: string) {
return window.localStorage.getItem(key);
try {
return window.localStorage.getItem(key);
} catch (err) {
// We are catching here as some browser block localstorege.
// TODO: Extend to .set and .destroy once this is verified as fix
console.log(err);
return null;
}
}
set(key: string, value: any) {
return window.localStorage.setItem(key, value);
......
Please register or to comment