Skip to content

Commit 6257807

Browse files
Calin Diacondmytro-ch
authored andcommitted
precision for price overriding by js
1 parent c07e5bb commit 6257807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/view/base/web/js/price-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ define([
7070
am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));
7171
r = (j ? i.substr(0, j) + groupSymbol : '') +
7272
i.substr(j).replace(re, '$1' + groupSymbol) +
73-
(precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : '');
73+
(precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');
7474

7575
return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
7676
}

0 commit comments

Comments
 (0)