From 0b120e8b429ed4b67e654659a8efe7479058c5b6 Mon Sep 17 00:00:00 2001 From: Tom Sherman Date: Fri, 13 Jan 2023 10:31:16 +0000 Subject: [PATCH] fix: handle undefined `._` property on `useUserLocalStorage` (#1060) Fixes https://github.com/elk-zone/elk/issues/1056 --- composables/users.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/users.ts b/composables/users.ts index 6bad13b8..9eebfc58 100644 --- a/composables/users.ts +++ b/composables/users.ts @@ -292,7 +292,7 @@ export function clearUserLocalStorage(account?: mastodon.v1.Account) { const id = `${account.acct}@${currentInstance.value?.uri || currentServer.value}` // @ts-expect-error bind value to the function - ;(useUserLocalStorage._ as Map>>).forEach((storage) => { + ;(useUserLocalStorage._ as Map>> | undefined)?.forEach((storage) => { if (storage.value[id]) delete storage.value[id] })