ts fixes
This commit is contained in:
parent
041eda05e5
commit
7812c8ccad
|
|
@ -13,11 +13,12 @@ export const Route = createFileRoute("/$namespace/")({
|
|||
await requireChains();
|
||||
const chains = useChainState.getState().chains;
|
||||
|
||||
if (typeof chains === "undefined") throw redirect({ to: "/" });
|
||||
if (typeof chains === "undefined" || !chains[0]._id)
|
||||
throw redirect({ to: "/" });
|
||||
|
||||
if (chains.length > 0)
|
||||
throw redirect({
|
||||
to: `/$namespace/$chainId`,
|
||||
to: "/$namespace/$chainId",
|
||||
params: { namespace: params.namespace, chainId: chains[0]._id },
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user