Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Draft
- Add to Cart and quantity buttons disabled when BCData is empty [#2612](https://github.com/bigcommerce/cornerstone/pull/2612)
- Introduce strikethrough display for discounted shipping quote prices on cart page [#2611](https://github.com/bigcommerce/cornerstone/pull/2611)
- Render native language names on storefront using Intl.DisplayNames [#2607](https://github.com/bigcommerce/cornerstone/pull/2607)
- CUST-4055 Add backend-based static translations for account edit page form fields [#2606](https://github.com/bigcommerce/cornerstone/pull/2606)
Expand Down
11 changes: 10 additions & 1 deletion assets/js/theme/common/product-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,16 @@ export default class ProductDetails extends ProductDetailsBase {
});

this.updateProductAttributes(productAttributesData);
this.updateView(productAttributesData, null);

if (productAttributesData
&& typeof productAttributesData === 'object'
&& Object.keys(productAttributesData).length > 0) {
this.updateView(productAttributesData, null);
} else {
// eslint-disable-next-line no-console
console.warn('BCData.product_attributes is empty on product initialization');
}

bannerUtils.dispatchProductBannerEvent(productAttributesData);

$productOptionsElement.show();
Expand Down