From 280abe4b807d5c7791d33afae0bfc7877df3ffe5 Mon Sep 17 00:00:00 2001 From: Bogdan Crisan Date: Thu, 28 Nov 2024 04:19:08 +0100 Subject: [PATCH] [ECO-2516] Prevent JSON deserialization issue (#420) --- src/typescript/frontend/src/configs/local-storage-keys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typescript/frontend/src/configs/local-storage-keys.ts b/src/typescript/frontend/src/configs/local-storage-keys.ts index 804a95b45..1097b5102 100644 --- a/src/typescript/frontend/src/configs/local-storage-keys.ts +++ b/src/typescript/frontend/src/configs/local-storage-keys.ts @@ -30,8 +30,8 @@ export function readLocalStorageCache(key: keyof typeof LOCAL_STORAGE_KEYS): if (str === null) { return null; } - const cache = parseJSON>(str); try { + const cache = parseJSON>(str); if (new Date(cache.expiry) > new Date()) { return cache.data; }