From 82eb72bbced931ba7f50069211f9511035ad09f4 Mon Sep 17 00:00:00 2001 From: MARVIN Date: Mon, 5 Jul 2021 22:45:13 +0800 Subject: [PATCH] fix(CountTo): Fix displaying empty string when the value is 0 (#864) --- src/components/CountTo/src/CountTo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CountTo/src/CountTo.vue b/src/components/CountTo/src/CountTo.vue index c7c4b2ed..7de33616 100644 --- a/src/components/CountTo/src/CountTo.vue +++ b/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;