Skip to content

Commit

Permalink
null check for chunkedCookie in server client
Browse files Browse the repository at this point in the history
  • Loading branch information
pfftdammitchris authored and J0 committed Jul 3, 2024
1 parent 7dc1837 commit 2087b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export function createStorageFromOptions(

let decoded = chunkedCookie;

if (chunkedCookie.startsWith(BASE64_PREFIX)) {
if (chunkedCookie !== null && chunkedCookie.startsWith(BASE64_PREFIX)) {
decoded = stringFromBase64URL(
chunkedCookie.substring(BASE64_PREFIX.length),
);
Expand Down

0 comments on commit 2087b0b

Please sign in to comment.