Skip to content

Commit

Permalink
fix: NS_ERROR_STORAGE_BUSY warnings in firefox (#7319)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhsin-k committed Jun 15, 2023
1 parent 69b9123 commit 2c34dca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/shared/helpers/localStorage.js
Expand Up @@ -4,8 +4,9 @@ export const LocalStorage = {
},

get(key) {
const value = window.localStorage.getItem(key);
let value = null;
try {
value = window.localStorage.getItem(key);
return typeof value === 'string' ? JSON.parse(value) : value;
} catch (error) {
return value;
Expand Down

0 comments on commit 2c34dca

Please sign in to comment.