UBERF-4886 (#4335)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-01-10 17:54:58 +06:00 committed by GitHub
parent b84aa01534
commit 8900b1e4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,6 +72,7 @@ export default async () => {
load: async () => { load: async () => {
if (typeof localStorage !== 'undefined') { if (typeof localStorage !== 'undefined') {
const storedValue = localStorage.getItem('platform.model') ?? null const storedValue = localStorage.getItem('platform.model') ?? null
try {
const model = storedValue != null ? JSON.parse(storedValue) : undefined const model = storedValue != null ? JSON.parse(storedValue) : undefined
if (token !== model?.token) { if (token !== model?.token) {
return { return {
@ -81,6 +82,7 @@ export default async () => {
} }
} }
return model.model return model.model
} catch {}
} }
return { return {
full: true, full: true,