From 7c965b022d7dd44ae1d84772cd9d73e4fc48015c Mon Sep 17 00:00:00 2001 From: "Mr. Algorithm" <11aravipratapsingh@gmail.com> Date: Sat, 4 Oct 2025 19:48:41 +0530 Subject: [PATCH] Update lib/utils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.ts b/lib/utils.ts index 2ca823c..4031a4c 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -98,7 +98,7 @@ export const formatArticle = ( }); export const formatChangePercent = (changePercent?: number) => { - if (!changePercent) return ''; + if (changePercent === undefined || changePercent === null) return ''; const sign = changePercent > 0 ? '+' : ''; return `${sign}${changePercent.toFixed(2)}%`; };