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:
parent
8ef4636635
commit
ed74f4bb0e
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
export const useAccountSession = () => useFetch(
|
||||
"/api/auth/session",
|
||||
{
|
||||
transform: (input) => input === undefined ? null : input,
|
||||
transform: (input) => input === undefined ? false : input,
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue