Browse Source

fix(CountTo): Fix displaying empty string when the value is 0 (#864)

MARVIN 3 years ago
parent
commit
82eb72bbce
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/CountTo/src/CountTo.vue

+ 1 - 1
src/components/CountTo/src/CountTo.vue

@@ -84,7 +84,7 @@
       }
 
       function formatNumber(num: number | string) {
-        if (!num) {
+        if (!num && num !== 0) {
           return '';
         }
         const { decimals, decimal, separator, suffix, prefix } = props;