From 748dd5e19f8df9ad9d8e4e59cd410945a2e9c09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Sun, 25 Feb 2024 20:43:34 +0100 Subject: [PATCH] fix(cache): return cached account as promise (#2623) --- composables/cache.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/composables/cache.ts b/composables/cache.ts index 6ea52f6b..094d05e0 100644 --- a/composables/cache.ts +++ b/composables/cache.ts @@ -23,7 +23,8 @@ export function fetchStatus(id: string, force = false): Promise { cacheStatus(status) @@ -42,7 +43,8 @@ export function fetchAccountById(id?: string | null): Promise { @@ -64,7 +66,7 @@ export async function fetchAccountByHandle(acct: string): Promise { cacheAccount(r, server, true) return r }) - cache.set(key, account) - return account + cache.set(key, promise) + return promise } export function useAccountById(id?: string | null) {