fix: handle undefined `._` property on `useUserLocalStorage` (#1060)
Fixes https://github.com/elk-zone/elk/issues/1056zio/stable
parent
b51fa37b34
commit
0b120e8b42
|
@ -292,7 +292,7 @@ export function clearUserLocalStorage(account?: mastodon.v1.Account) {
|
||||||
|
|
||||||
const id = `${account.acct}@${currentInstance.value?.uri || currentServer.value}`
|
const id = `${account.acct}@${currentInstance.value?.uri || currentServer.value}`
|
||||||
// @ts-expect-error bind value to the function
|
// @ts-expect-error bind value to the function
|
||||||
;(useUserLocalStorage._ as Map<string, Ref<Record<string, any>>>).forEach((storage) => {
|
;(useUserLocalStorage._ as Map<string, Ref<Record<string, any>>> | undefined)?.forEach((storage) => {
|
||||||
if (storage.value[id])
|
if (storage.value[id])
|
||||||
delete storage.value[id]
|
delete storage.value[id]
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue