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