fix empty metagame for world page too
This commit is contained in:
parent
52f03ad30f
commit
3b8d8f15b0
1 changed files with 8 additions and 5 deletions
|
@ -80,11 +80,14 @@ export default function World() {
|
|||
} = useLoaderData<typeof loader>();
|
||||
|
||||
const worldInfo = worlds[String(id || "default")];
|
||||
const nextZoneID = metagame.zones.sort(
|
||||
(a, b) =>
|
||||
new Date(a.locked_since ?? Date.now()).getTime() -
|
||||
new Date(b.locked_since ?? Date.now()).getTime()
|
||||
)[0].id;
|
||||
const nextZoneID =
|
||||
metagame.zones.length !== 0
|
||||
? metagame.zones.sort(
|
||||
(a, b) =>
|
||||
new Date(a.locked_since ?? Date.now()).getTime() -
|
||||
new Date(b.locked_since ?? Date.now()).getTime()
|
||||
)[0].id
|
||||
: 0;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Add table
Reference in a new issue