-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update getProductOptions to handle divergent options #2747
Conversation
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
return Object.assign( | ||
{}, | ||
...selectedOption.map((option) => ({[option.name]: option.value})), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now going to return an Object rather than a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh oops! nice catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks LGTM!
WHY are these changes introduced?
getProductOptions
will fail on combined listing products with divergent options. For example, we have a parent product TV and the only common option between its child products is size of the TV.getProductOptions
fails at finding a matching encoding and mapping with the selected option.WHAT is this pull request doing?
HOW to test your changes?
Post-merge steps
Checklist