From 7b42459e8ffb88bbf53a5cefb6ad127b55328d7e Mon Sep 17 00:00:00 2001 From: Mawoka Date: Fri, 9 Sep 2022 11:21:31 +0200 Subject: [PATCH] :bug: Fixed possible bug --- frontend/src/hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/hooks.ts b/frontend/src/hooks.ts index 3962ee0..6fccfe9 100644 --- a/frontend/src/hooks.ts +++ b/frontend/src/hooks.ts @@ -27,7 +27,7 @@ export const handle: Handle = async ({ event, resolve }) => { if (jwt) { new_jwt = jwt[0]; } else { - new_jwt = cookie.parse(res.headers.get('set-cookie')).access_token; + new_jwt = cookie.parse(res.headers.get('set-cookie') ?? '').access_token; } event.locals.email = await ( await fetch(`${process.env.API_URL}/api/v1/users/auth/internal/email`, {