From 8900b1e4e91ad690c6c2a3ed05e9b0e413dda3eb Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Wed, 10 Jan 2024 17:54:58 +0600 Subject: [PATCH] UBERF-4886 (#4335) Signed-off-by: Denis Bykhov --- plugins/client-resources/src/index.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/client-resources/src/index.ts b/plugins/client-resources/src/index.ts index 9bd26dd46f..a4d0a24ed5 100644 --- a/plugins/client-resources/src/index.ts +++ b/plugins/client-resources/src/index.ts @@ -72,15 +72,17 @@ export default async () => { load: async () => { if (typeof localStorage !== 'undefined') { const storedValue = localStorage.getItem('platform.model') ?? null - const model = storedValue != null ? JSON.parse(storedValue) : undefined - if (token !== model?.token) { - return { - full: false, - transactions: [], - hash: [] + try { + const model = storedValue != null ? JSON.parse(storedValue) : undefined + if (token !== model?.token) { + return { + full: false, + transactions: [], + hash: [] + } } - } - return model.model + return model.model + } catch {} } return { full: true,