From d37a1ffa992d45560fcdfb008a2a6a5b76062654 Mon Sep 17 00:00:00 2001 From: Yu Che Date: Fri, 13 Oct 2023 05:49:27 -0500 Subject: [PATCH] fix: stash tvos compatibility (#798) --- src/store/proxies.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/proxies.tsx b/src/store/proxies.tsx index 0b99babdd..4926dfdab 100644 --- a/src/store/proxies.tsx +++ b/src/store/proxies.tsx @@ -56,7 +56,7 @@ function mapLatency(names: string[], getProxy: (name: string) => { history: Late for (const name of names) { const p = getProxy(name) || { history: [] }; const history = p.history; - const h = history[history.length - 1]; + const h = history?.at?.(-1); if (h && typeof h.delay === 'number') { result[name] = { kind: 'Result', number: h.delay }; }