Skip to content

fix: swap content/data keys in onProductOptionsChanged event detail#2640

Merged
bc-yevhenii-buliuk merged 1 commit into
bigcommerce:masterfrom
sacr3dc0w:master
May 11, 2026
Merged

fix: swap content/data keys in onProductOptionsChanged event detail#2640
bc-yevhenii-buliuk merged 1 commit into
bigcommerce:masterfrom
sacr3dc0w:master

Conversation

@sacr3dc0w
Copy link
Copy Markdown
Contributor

What?

Fixes a bug in productOptionsChanged where the content and data keys in the onProductOptionsChanged CustomEvent detail payload were swapped.

Before:

detail: {
    content: productAttributesData,
    data: productAttributesContent,
}

After:

detail: {
    content: productAttributesContent,
    data: productAttributesData,
}

productAttributesData is the structured data object returned from the optionChange API response, and should be keyed as data. productAttributesContent is the rendered template string, and should be keyed as content. Any listeners on onProductOptionsChanged expecting conventional key semantics would have received the wrong value.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Tickets / Documentation

Screenshots (if appropriate)

N/A — logic fix with no visual output.

@sacr3dc0w sacr3dc0w requested a review from a team as a code owner April 13, 2026 18:58
Copy link
Copy Markdown
Member

@rtalvarez rtalvarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this!

@bc-yevhenii-buliuk
Copy link
Copy Markdown
Contributor

@sacr3dc0w are you done with this PR and planning to merge it or you planning to add something else?

@sacr3dc0w
Copy link
Copy Markdown
Contributor Author

@bc-yevhenii-buliuk All ready to merge!

@bc-yevhenii-buliuk bc-yevhenii-buliuk merged commit fd5457d into bigcommerce:master May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants