From 710f576c77cf2fe92692d9b2eea8633e5f2cbbc5 Mon Sep 17 00:00:00 2001 From: archipelago Date: Mon, 20 Jul 2026 02:52:43 -0400 Subject: [PATCH] fix(ui): satisfy noUncheckedIndexedAccess in the WG retry ladder vue-tsc in the release build (unlike the gate's type-check) rejects indexing WG_RETRY_DELAYS_MS with a bare counter; hoist the delay into a local and gate on undefined instead of the length check. Co-Authored-By: Claude Fable 5 --- neode-ui/src/components/CompanionIntroOverlay.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neode-ui/src/components/CompanionIntroOverlay.vue b/neode-ui/src/components/CompanionIntroOverlay.vue index c86b47ee..a4721c27 100644 --- a/neode-ui/src/components/CompanionIntroOverlay.vue +++ b/neode-ui/src/components/CompanionIntroOverlay.vue @@ -514,8 +514,9 @@ async function loadWgPeer() { } catch (e) { const raw = e instanceof Error ? e.message : '' const isNetworkErr = WG_NETWORK_ERR.test(raw) - if (isNetworkErr && attempt < WG_RETRY_DELAYS_MS.length && stillOnWgStep()) { - await sleep(WG_RETRY_DELAYS_MS[attempt]) + const retryDelay = WG_RETRY_DELAYS_MS[attempt] + if (isNetworkErr && retryDelay !== undefined && stillOnWgStep()) { + await sleep(retryDelay) if (stillOnWgStep()) continue } // fetch()'s raw "Failed to fetch" means the node itself was unreachable —