fix: Missing session data
This commit is contained in:
parent
5b22bb4818
commit
335e3216e2
1 changed files with 1 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ export const getTeam = (event) => {
|
||||||
const cookies = Cookie.parse(event.request.headers.get('cookie'));
|
const cookies = Cookie.parse(event.request.headers.get('cookie'));
|
||||||
if (cookies?.teamId) {
|
if (cookies?.teamId) {
|
||||||
return cookies.teamId;
|
return cookies.teamId;
|
||||||
} else if (event.locals.session.data.teamId) {
|
} else if (event.locals.session.data?.teamId) {
|
||||||
return event.locals.session.data.teamId;
|
return event.locals.session.data.teamId;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue