Commit 82eb72bbced931ba7f50069211f9511035ad09f4
Committed by
GitHub
1 parent
5f1a6cdc
fix(CountTo): Fix displaying empty string when the value is 0 (#864)
Showing
1 changed file
with
1 additions
and
1 deletions
src/components/CountTo/src/CountTo.vue
@@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
84 | } | 84 | } |
85 | 85 | ||
86 | function formatNumber(num: number | string) { | 86 | function formatNumber(num: number | string) { |
87 | - if (!num) { | 87 | + if (!num && num !== 0) { |
88 | return ''; | 88 | return ''; |
89 | } | 89 | } |
90 | const { decimals, decimal, separator, suffix, prefix } = props; | 90 | const { decimals, decimal, separator, suffix, prefix } = props; |