The Magento_Catalog/js/price-utils::formatPrice() pollutes the global formatting settings with local ones because of a wrong lodash extend / assignIn usage

bug
javascript
price
lodash
price-format
(Dmitry Fedyuk) #1

Look at the last line:

Such extend / assignIn usage modifies the first argument:

So the globalPriceFormat global price format becomes polluted with a random local format value,

0 Likes

How to format a money value (e.g. price) in JavaScript?
The global «groupLength» property has an incorrect «,» value instead of a natural number in Magento_Catalog/js/price-utils
(Dmitry Fedyuk) #2

See also:

0 Likes