Skip to content

Commit

Permalink
[ECO-2516] Prevent JSON deserialization issue (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
CRBl69 authored Nov 28, 2024
1 parent 50336ae commit 280abe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typescript/frontend/src/configs/local-storage-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export function readLocalStorageCache<T>(key: keyof typeof LOCAL_STORAGE_KEYS):
if (str === null) {
return null;
}
const cache = parseJSON<LocalStorageCache<T>>(str);
try {
const cache = parseJSON<LocalStorageCache<T>>(str);
if (new Date(cache.expiry) > new Date()) {
return cache.data;
}
Expand Down

0 comments on commit 280abe4

Please sign in to comment.