Skip to content

Commit

Permalink
allow only strings
Browse files Browse the repository at this point in the history
  • Loading branch information
pfftdammitchris authored and J0 committed Jul 3, 2024
1 parent 2087b0b commit 247c591
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 !== null && chunkedCookie.startsWith(BASE64_PREFIX)) {
if (typeof chunkedCookie === 'string' && chunkedCookie.startsWith(BASE64_PREFIX)) {
decoded = stringFromBase64URL(
chunkedCookie.substring(BASE64_PREFIX.length),
);
Expand Down

0 comments on commit 247c591

Please sign in to comment.