From 785db9277db5bd9e5e160dc205531a9bfef5abce Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Mon, 29 Jun 2026 17:33:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=95=86=E5=93=81=E7=94=9F=E5=9B=BE?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=E5=AE=B9=E9=94=99=20=E2=80=94=20API=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=9D=9E=E6=95=B0=E7=BB=84=E6=97=B6=E8=AE=BE?= =?UTF-8?q?=E7=A9=BA=E6=95=B0=E7=BB=84=E9=81=BF=E5=85=8D=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/ImagePage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/ImagePage.tsx b/apps/web/src/components/ImagePage.tsx index ebecb73..95c9265 100644 --- a/apps/web/src/components/ImagePage.tsx +++ b/apps/web/src/components/ImagePage.tsx @@ -67,7 +67,10 @@ export default function ImagePage() { useEffect(() => { fetch(API) .then(r => r.json()) - .then(setImages) + .then(data => { + setImages(Array.isArray(data) ? data : []) + }) + .catch(() => setImages([])) .finally(() => setLoading(false)) }, [])