| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6d86f8a commit 4e58ec4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -267,7 +267,7 @@ class Benchmark { | |||
| 267 | 267 | function nanoSecondsToString(bigint) { | |
| 268 | 268 | const str = bigint.toString(); | |
| 269 | 269 | const decimalPointIndex = str.length - 9; | |
| 270 | - if (decimalPointIndex < 0) { | ||
| 270 | + if (decimalPointIndex <= 0) { | ||
| 271 | 271 | return `0.${'0'.repeat(-decimalPointIndex)}${str}`; | |
| 272 | 272 | } | |
| 273 | 273 | return `${str.slice(0, decimalPointIndex)}.${str.slice(decimalPointIndex)}`; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments