From 6c20f3d026f07a9680d73610c6c27b931ed7ea5c Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Tue, 4 Jan 2022 13:12:34 +0700 Subject: [PATCH] Fix when error wish tally --- src/routes/wish/tally/index.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routes/wish/tally/index.svelte b/src/routes/wish/tally/index.svelte index f830cfa4..725750c6 100644 --- a/src/routes/wish/tally/index.svelte +++ b/src/routes/wish/tally/index.svelte @@ -100,6 +100,7 @@ } async function getData() { + error = undefined; loading = true; const url = new URL(`${__paimon.env.API_HOST}/wish`); @@ -112,6 +113,10 @@ headers: { 'Content-Type': 'application/json' }, }); + if (res.status === 400) { + error = 'Not available yet'; + } + const data = await res.json(); const values = [0, 0];