File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
app/code/Magento/Backend/view/adminhtml/web/js Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,16 @@ define([
47
47
_saveHandler : function ( form ) {
48
48
var formData = { } ,
49
49
requestData = { } ,
50
+ counts = { } ,
50
51
options = $ . data ( form , 'validator' ) . settings ;
51
52
52
53
if ( $ ( form ) . validation ( 'isValid' ) ) {
53
- var counts = { } ;
54
54
$ . each ( $ ( form ) . serializeArray ( ) , function ( ) {
55
- var name = this . name ;
56
- counts [ name ] = ( counts [ name ] || 0 ) + 1 ;
57
- if ( formData [ name ] ) {
58
- var replacement = '[' + ( counts [ name ] - 1 ) + ']' ;
59
- name = name . replace ( new RegExp ( / \[ \] $ / g) , replacement ) ;
55
+ counts [ this . name ] = ( counts [ this . name ] || 0 ) + 1 ;
56
+ if ( formData [ this . name ] ) {
57
+ this . name = this . name . replace ( new RegExp ( / \[ \] $ / g) , '[' + ( counts [ this . name ] - 1 ) + ']' ) ;
60
58
}
61
- formData [ name ] = this . value || '' ;
59
+ formData [ this . name ] = this . value || '' ;
62
60
} ) ;
63
61
64
62
requestData = {
You can’t perform that action at this time.
0 commit comments