Use false instead of null for empty session

The caching layer of Nuxt assumes no entry exists if it's nullish.  This
causes null to be treated as if the resource needs to be fetched.  Use
false instead.
This commit is contained in:
Hornwitser 2025-03-08 00:33:35 +01:00
parent 8ef4636635
commit ed74f4bb0e

View file

@ -1,6 +1,6 @@
export const useAccountSession = () => useFetch(
"/api/auth/session",
{
transform: (input) => input === undefined ? null : input,
transform: (input) => input === undefined ? false : input,
}
);