redirect for just null

This commit is contained in:
Robert 2024-03-13 17:47:59 +07:00
parent fda32d78c8
commit 5e500ed4ce
No known key found for this signature in database
GPG Key ID: F631C7FD957D5F22

View File

@ -7,7 +7,7 @@ export async function requireChains(namespaceId: string) {
if (chainState.chains) return; if (chainState.chains) return;
const chains = await getChainList(namespaceId); const chains = await getChainList(namespaceId);
if (chains === null || chains.length === 0) throw redirect({ to: "/" }); if (chains === null) throw redirect({ to: "/" });
chainState.setChains(chains); chainState.setChains(chains);
} }