Skip to content

Commit f59bc17

Browse files
shubham sharmashubham sharma
authored andcommitted
fixed issue magento#18082
1 parent 83a9b9c commit f59bc17

File tree

1 file changed

+14
-11
lines changed
  • app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations

1 file changed

+14
-11
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -406,17 +406,20 @@ define([
406406
* - configurable-matrix-serialized;
407407
* - associated_product_ids_serialized.
408408
*/
409-
serializeData: function () {
410-
this.source.data['configurable-matrix-serialized'] =
411-
JSON.stringify(this.source.data['configurable-matrix']);
412-
413-
delete this.source.data['configurable-matrix'];
414-
415-
this.source.data['associated_product_ids_serialized'] =
416-
JSON.stringify(this.source.data['associated_product_ids']);
417-
418-
delete this.source.data['associated_product_ids'];
419-
},
409+
serializeData: function () {
410+
this.source.data['configurable-matrix-serialized'] =
411+
JSON.stringify(this.source.data['configurable-matrix']);
412+
if ($('.admin__field-error').length===0) {
413+
delete this.source.data['configurable-matrix'];
414+
}
415+
416+
417+
this.source.data['associated_product_ids_serialized'] =
418+
JSON.stringify(this.source.data['associated_product_ids']);
419+
if ($('.admin__field-error').length===0) {
420+
delete this.source.data['associated_product_ids'];
421+
}
422+
},
420423

421424
/**
422425
* Check for newly added attributes

0 commit comments

Comments
 (0)