Explorar o código

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

MARVIN %!s(int64=3) %!d(string=hai) anos
pai
achega
82eb72bbce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;