Skip to content

Commit c656229

Browse files
ENGCOM-1084: precision for price overriding by js #14350
- Merge Pull Request #14350 from cdiacon/magento2:cdiacon/fixissue-14249 - Merged commits: 1. 9ea2ccf
2 parents a28702a + 9ea2ccf commit c656229

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
@@ -79,7 +79,7 @@ define([
7979
am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));
8080
r = (j ? i.substr(0, j) + groupSymbol : '') +
8181
i.substr(j).replace(re, '$1' + groupSymbol) +
82-
(precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : '');
82+
(precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');
8383

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

0 commit comments

Comments
 (0)