File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments