From 12ee0001f9454fb6405b534415c9a5965e1cfaad Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sat, 5 Aug 2023 21:50:11 +0100 Subject: [PATCH] fix: skip sessions if no permission --- app/panel/inspect/account/[id]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/panel/inspect/account/[id]/page.tsx b/app/panel/inspect/account/[id]/page.tsx index d9d5795..c57e847 100644 --- a/app/panel/inspect/account/[id]/page.tsx +++ b/app/panel/inspect/account/[id]/page.tsx @@ -35,7 +35,7 @@ export default async function User({ if (!account) return notFound(); const user = await fetchUserById(params.id); - const sessions = await fetchSessionsByAccount(params.id); + const sessions = await fetchSessionsByAccount(params.id).catch(() => []); return (