File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
app/code/Magento/Checkout/view/frontend/web/js/action Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -107,16 +107,18 @@ define([
107
107
* Form validation failed.
108
108
*/
109
109
onError : function ( response ) {
110
- var that = this ;
110
+ var that = this ,
111
+ responseData = JSON . parse ( response [ 'error_message' ] ) ;
112
+
111
113
if ( response [ 'error_message' ] ) {
112
114
try {
113
- var responseData = JSON . parse ( response [ 'error_message' ] ) ;
114
115
$ . each ( responseData , function ( index , data ) {
115
- if ( data [ 'itemId' ] !== undefined ) {
116
- let elm = $ ( '#cart-' + data [ 'itemId' ] + '-qty' ) ;
116
+
117
+ if ( data . itemId !== undefined ) {
118
+ let elm = $ ( '#cart-' + data . itemId + '-qty' ) ;
117
119
elm . val ( elm . attr ( 'data-item-qty' ) ) ;
118
120
}
119
- response [ 'error_message' ] = data [ ' error' ] ;
121
+ response [ 'error_message' ] = data . error ;
120
122
} ) ;
121
123
} catch ( e ) { }
122
124
alert ( {
You can’t perform that action at this time.
0 commit comments