Skip to content

Commit a5f20fc

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-70634' into 2.2-develop-pr11
2 parents e5d6bca + 2345a1f commit a5f20fc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/components/custom-options-price-type.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,17 @@ define([
3535
* Update addbefore for price field. Change it to currency or % depends of price_type value.
3636
*/
3737
updateAddBeforeForPrice: function () {
38-
var priceIndex = typeof this.imports.priceIndex == 'undefined'
39-
? 'price'
40-
: this.imports.priceIndex;
41-
38+
var addBefore, currentValue;
39+
var priceIndex = typeof this.imports.priceIndex == 'undefined' ? 'price' : this.imports.priceIndex;
4240
var priceName = this.parentName + '.' + priceIndex;
4341

4442
var uiPrice = uiRegistry.get(priceName);
4543

4644
if (uiPrice && uiPrice.addbeforePool) {
47-
var currentValue = this.value();
48-
var addBefore;
45+
currentValue = this.value();
4946

5047
uiPrice.addbeforePool.forEach(function (item) {
51-
if (item.value == currentValue) {
48+
if (item.value === currentValue) {
5249
addBefore = item.label;
5350
}
5451
});

0 commit comments

Comments
 (0)