Explorar el Código

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

MARVIN hace 3 años
padre
commit
82eb72bbce
Se han modificado 1 ficheros con 1 adiciones y 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;