Skip to content

Commit

Permalink
lastActive should use the zoneUnits
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfarms committed May 11, 2024
1 parent e4c8789 commit 2e617cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const ZoneIndex = ({ config }: { config: Partial<GameConfig> | undefined }) => {
const activeUnits = zoneUnits.filter(
(u) => u.location && u.location.time + unitTimeoutBlocks > blockNumber
);
const lastActiveUnit = activeUnits.reduce(
const lastActiveUnit = zoneUnits.reduce(
(lastActiveUnit, u) =>
u.location && u.location.time > lastActiveUnit ? u.location.time : lastActiveUnit,
0
Expand Down

0 comments on commit 2e617cb

Please sign in to comment.