diff --git a/.changeset/popular-eyes-smell.md b/.changeset/popular-eyes-smell.md new file mode 100644 index 0000000000..3bd6dec1f9 --- /dev/null +++ b/.changeset/popular-eyes-smell.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen-react': patch +--- + +Fix incorrect creation of cookie token that only happens on specific dates diff --git a/packages/hydrogen-react/src/cookies-utils.tsx b/packages/hydrogen-react/src/cookies-utils.tsx index 72453b6281..70f90aad41 100644 --- a/packages/hydrogen-react/src/cookies-utils.tsx +++ b/packages/hydrogen-react/src/cookies-utils.tsx @@ -54,7 +54,8 @@ export function hexTime(): string { .toString(16) .toLowerCase(); - return output.padStart(8 - output.length, '0'); + // Ensure the output is exactly 8 characters + return output.padStart(8, '0'); } export function getShopifyCookies(cookies: string): ShopifyCookies {