diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js index be290e49a43c3..e2e0faec3b805 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js @@ -407,15 +407,17 @@ define([ * - associated_product_ids_serialized. */ serializeData: function () { - this.source.data['configurable-matrix-serialized'] = - JSON.stringify(this.source.data['configurable-matrix']); - - delete this.source.data['configurable-matrix']; - - this.source.data['associated_product_ids_serialized'] = - JSON.stringify(this.source.data['associated_product_ids']); + if (this.source.data['configurable-matrix']) { + this.source.data['configurable-matrix-serialized'] = + JSON.stringify(this.source.data['configurable-matrix']); + delete this.source.data['configurable-matrix']; + } - delete this.source.data['associated_product_ids']; + if (this.source.data['associated_product_ids']) { + this.source.data['associated_product_ids_serialized'] = + JSON.stringify(this.source.data['associated_product_ids']); + delete this.source.data['associated_product_ids']; + } }, /**