From 36e5374ef16a9ef9985f1363e217fccb8554ad20 Mon Sep 17 00:00:00 2001 From: yu-zhen Date: Fri, 6 Dec 2024 02:05:10 +0900 Subject: [PATCH] fix: catch error for fetchTally function --- packages/interface/src/utils/fetchTally.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/interface/src/utils/fetchTally.ts b/packages/interface/src/utils/fetchTally.ts index 644519cb..f4d48bdb 100644 --- a/packages/interface/src/utils/fetchTally.ts +++ b/packages/interface/src/utils/fetchTally.ts @@ -62,5 +62,7 @@ export async function fetchTallies(): Promise { body: JSON.stringify({ query: talliesQuery, }), - }).then((r) => r.data.tallies); + }) + .then((r) => r.data.tallies) + .catch(() => []); }