Skip to content
Merged
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
8 changes: 4 additions & 4 deletions core/modules/catalog/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export function populateProductConfigurationAsync (context, { product, selectedV
for (let option of product.configurable_options) {
let attribute_code
let attribute_label
if (option.attribute_id) {
if (option.attribute_id) {
let attr = context.rootState.attribute.list_by_id[option.attribute_id]
if (!attr) {
console.error('Wrong attribute given in configurable_options - can not find by attribute_id', option)
Expand All @@ -368,7 +368,7 @@ export function populateProductConfigurationAsync (context, { product, selectedV
} else {
if (!option.attribute_code) {
console.error('Wrong attribute given in configurable_options - no attribute_code', option)
continue
continue
} else { // we do have attribute_code!
attribute_code = option.attribute_code
attribute_label = option.frontend_label ? option.frontend_label : option.default_frontend_label
Expand Down Expand Up @@ -419,7 +419,7 @@ export function findConfigurableChildAsync({ product, configuration = null, sele

if (availabilityCheck) {
if (configurableChild.stock && !rootStore.state.config.products.listOutOfStockProducts) {
if (!configurableChild.is_in_stock) {
if (!configurableChild.stock.is_in_stock) {
return false
}
}
Expand Down Expand Up @@ -511,7 +511,7 @@ export function configureProductAsync (context, { product, configuration, select
if (selectDefaultVariant) {
context.dispatch('setCurrent', product) // without the configuration
}
}
}
return selectedVariant
} else {
if (fallbackToDefaultWhenNoAvailable) {
Expand Down