Skip to content

Commit

Permalink
Fix decoder examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoffbeck committed Oct 10, 2024
1 parent 35eb35a commit c4abf9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {decodeEncodedVariant} from '@shopify/hydrogen-react';
// }
// ]

const encodedVariantAvailability = 'v1_0:0-2,1:2';
const encodedVariantAvailability = 'v1_0:0-2,1:2,';

const decodedVariantAvailability = decodeEncodedVariant(
encodedVariantAvailability,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ import {isOptionValueCombinationInEncodedVariant} from '@shopify/hydrogen-react'
// ]
// }
// ]
const encodedVariantExistence = 'v1_0:0-1,1:2';
const encodedVariantExistence = 'v1_0:0-1,1:2,';

// For reference: decoded encodedVariantExistence
// {
// [0,0], // Red, S
// [0,1], // Red, M
// [0,2], // Red, L
// [1,2] // Blue, L
// }

Expand Down

0 comments on commit c4abf9c

Please sign in to comment.