Skip to content

Commit 853e421

Browse files
author
Roger
committed
Issue 36309: Undefined value sets in the variant's sku
1 parent 5dc13c3 commit 853e421

File tree

1 file changed

+7
-2
lines changed
  • app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations

1 file changed

+7
-2
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,14 @@ define([
130130
* @return {String|Number|Array}
131131
*/
132132
getProductValue: function (name) {
133-
name = name.split('/').join('][');
133+
var value;
134134

135-
return $('[name="product[' + name + ']"]:enabled:not(.ignore-validate)', this.productForm).val();
135+
name = name.split('/').join('][');
136+
value = $('[name="product[' + name + ']"]:enabled:not(.ignore-validate)', this.productForm).val();
137+
if (value === undefined) {
138+
value = this.source.get('data.product.' + name);
139+
}
140+
return value;
136141
},
137142

138143
/**

0 commit comments

Comments
 (0)