Skip to content

Commit 58fe27c

Browse files
author
Dipak Sarkar
committed
updated number formatter
1 parent a7e904a commit 58fe27c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/number-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default function NumberFormat(config = options) {
8686
parts[0] = parts[0].toString().replace(/(\d)(?=(?:\d{3})+\b)/gm, `$1${this.options.separator}`)
8787
if (this.isClean) {
8888
parts[1] = this.toNumber(`.${parts[1]}`).toString().replace('0.', '')
89-
return parts[1] && parts[1] >= 0 ? parts.join(this.options.decimal) : parts[0]
89+
return parts[1] && parts[1] > 0 ? parts.join(this.options.decimal) : parts[0]
9090
}
9191
return parts.join(this.options.decimal)
9292
}

0 commit comments

Comments
 (0)