Skip to content

Commit df6633d

Browse files
committed
ACP2E-1784: fix static js errors
1 parent af7f548 commit df6633d

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

app/code/Magento/Bundle/view/base/web/js/price-bundle.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,21 @@ define([
8888
*/
8989
_parseQueryParams: function (queryString) {
9090
var queryParams = $.parseQuery({
91-
query: queryString
92-
});
93-
var form = this.element,
91+
query: queryString
92+
}),
93+
form = this.element,
9494
options = $(this.options.productBundleSelector, form),
9595
qtys = $(this.options.qtyFieldSelector, form);
9696

9797
$.each(queryParams, $.proxy(function (key, value) {
98-
options.each(function(index, option) {
99-
if ( option.name === key ) {
100-
$(option).val(value).change();
101-
$(option).attr('value', value);
98+
options.each(function (index, option) {
99+
if (option.name === key) {
100+
$(option).val(value);
102101
}
103102
});
104-
qtys.each(function(index, qty) {
103+
qtys.each(function (index, qty) {
105104
if (qty.name === key) {
106105
$(qty).val(value);
107-
$(qty).attr('value', value);
108106
}
109107
});
110108
}, this));

app/code/Magento/GroupedProduct/view/frontend/web/js/grouped-product.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ define([
66
'jquery',
77
'underscore',
88
'jquery-ui-modules/widget',
9-
'jquery/jquery.parsequery',
10-
], function ($, _) {
9+
'jquery/jquery.parsequery'
10+
], function ($) {
1111
'use strict';
1212

1313
$.widget('mage.groupedProduct', {
@@ -46,19 +46,20 @@ define([
4646
*/
4747
_parseQueryParams: function (queryString) {
4848
var queryParams = $.parseQuery({
49-
query: queryString
50-
});
51-
var form = this.element,
49+
query: queryString
50+
}),
51+
form = this.element,
5252
qtyNameSelector = this.options.qtyNameSelector,
5353
qtys = $(this.options.qtySelector, form);
5454

5555
$.each(queryParams, $.proxy(function (key, value) {
56-
qtys.each(function(index, qty) {
56+
qtys.each(function (index, qty) {
5757
var nameSelector = qtyNameSelector.concat('[', key, ']');
58-
if ( qty.name === nameSelector ) {
59-
$(qty).attr('value', value);
58+
59+
if (qty.name === nameSelector) {
60+
$(qty).val(value);
6061
}
61-
})
62+
});
6263
}, this));
6364
}
6465
});

app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ define([
7171

7272
$(this.options.qtyInfo).trigger('change');
7373
for (key in this.options.productType) {
74-
if (this.options.productType.hasOwnProperty(key) && this.options.productType[key] + 'Info' in this.options) {
74+
if (this.options.productType.hasOwnProperty(key)
75+
&& this.options.productType[key] + 'Info' in this.options) {
7576
$(this.options[this.options.productType[key] + 'Info']).trigger('change');
7677
}
7778
}

0 commit comments

Comments
 (0)