File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
app/code/Magento/Catalog/view/adminhtml/web/js/components Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -35,20 +35,17 @@ define([
35
35
* Update addbefore for price field. Change it to currency or % depends of price_type value.
36
36
*/
37
37
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 ;
42
40
var priceName = this . parentName + '.' + priceIndex ;
43
41
44
42
var uiPrice = uiRegistry . get ( priceName ) ;
45
43
46
44
if ( uiPrice && uiPrice . addbeforePool ) {
47
- var currentValue = this . value ( ) ;
48
- var addBefore ;
45
+ currentValue = this . value ( ) ;
49
46
50
47
uiPrice . addbeforePool . forEach ( function ( item ) {
51
- if ( item . value == currentValue ) {
48
+ if ( item . value === currentValue ) {
52
49
addBefore = item . label ;
53
50
}
54
51
} ) ;
You can’t perform that action at this time.
0 commit comments