From 231f0dba37c4a86f9b4b9300066d2f6352d0d5a5 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Wed, 5 Aug 2026 17:37:11 +0530 Subject: [PATCH] fix: resolve 1 bugs in Astrodex --- src/components/AgentTerminal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AgentTerminal.tsx b/src/components/AgentTerminal.tsx index dbcc920..864abd6 100644 --- a/src/components/AgentTerminal.tsx +++ b/src/components/AgentTerminal.tsx @@ -96,7 +96,7 @@ export function AgentTerminal() { useEffect(() => { if (claimHistory.length > lastHistoryLen.current) { - const latest = claimHistory[claimHistory.length - 1] + const latest = claimHistory.at(-1) lastHistoryLen.current = claimHistory.length setLogs((prev) => { const msg = `[TRK] Asteroid ${latest.id} ${latest.action === "CLAIMED" ? "claimed and secured" : "claim released"}`