From 8c8f340553c9f45a84625c390a8b6e55e89df6dc Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sun, 9 Mar 2025 15:50:18 +0100 Subject: [PATCH] Type false session as null Make the typing for the session work again by telling TypeScript the false value is actually null. --- composables/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/session.ts b/composables/session.ts index 18345cf..407bfe4 100644 --- a/composables/session.ts +++ b/composables/session.ts @@ -1,7 +1,7 @@ export const useAccountSession = () => useFetch( "/api/auth/session", { - transform: (input) => input === undefined ? false : input, + transform: (input) => input === undefined ? false as any as null: input, getCachedData(key, nuxtApp) { return nuxtApp.payload.data[key]; },