Skip to content

Commit 9b2607d

Browse files
bigonezchrisvfritz
authored andcommitted
Fix a typing error. (#507)
The expression, 0.035.toFixed(2) & 0.045.toFixed(2), will return '0.04', rather than '0.4'.
1 parent af59066 commit 9b2607d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ For a very naive implementation, you could just do something like this:
10361036
'$' + price.toFixed(2)
10371037
```
10381038

1039-
In many cases though, you'll still run into strange behavior (e.g. `0.035.toFixed(2)` rounds up to `0.4`, but `0.045` rounds down to `0.4`). To work around these issues, you can use the [`accounting`](http://openexchangerates.github.io/accounting.js/) library to more reliably format currencies.
1039+
In many cases though, you'll still run into strange behavior (e.g. `0.035.toFixed(2)` rounds up to `0.04`, but `0.045` rounds down to `0.04`). To work around these issues, you can use the [`accounting`](http://openexchangerates.github.io/accounting.js/) library to more reliably format currencies.
10401040

10411041
{% raw %}
10421042
<div class="upgrade-path">

0 commit comments

Comments
 (0)