Skip to content

Commit

Permalink
fix(docs-i18n-ru/en): fix crash on "header" stage in tutorial (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
Voyager101pw committed May 6, 2024
1 parent 65fa8c5 commit 3aec50d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ export async function getUserFromSession(request: Request) {
const cookie = request.headers.get("Cookie");
const session = await sessionStorage.getSession(cookie);

return session.get("user");
return session.get("user") ?? null;
}

export async function requireUser(request: Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ export async function getUserFromSession(request: Request) {
const cookie = request.headers.get("Cookie");
const session = await sessionStorage.getSession(cookie);

return session.get("user");
return session.get("user") ?? null;
}

export async function requireUser(request: Request) {
Expand Down

0 comments on commit 3aec50d

Please sign in to comment.