Type false session as null

Make the typing for the session work again by telling TypeScript the
false value is actually null.
This commit is contained in:
Hornwitser 2025-03-09 15:50:18 +01:00
parent c71841801b
commit 8c8f340553

View file

@ -1,7 +1,7 @@
export const useAccountSession = () => useFetch( export const useAccountSession = () => useFetch(
"/api/auth/session", "/api/auth/session",
{ {
transform: (input) => input === undefined ? false : input, transform: (input) => input === undefined ? false as any as null: input,
getCachedData(key, nuxtApp) { getCachedData(key, nuxtApp) {
return nuxtApp.payload.data[key]; return nuxtApp.payload.data[key];
}, },