From 3f22e4375df18d87009a98d3a78c23c609fc837b Mon Sep 17 00:00:00 2001 From: archipelago Date: Fri, 7 Aug 2026 08:45:46 -0400 Subject: [PATCH] fix(ui): strict-TS cast in peers per-onion grouping vue-tsc rejected the double cast; vitest strips types so it slipped through. Narrow once into a local instead. Co-Authored-By: Claude --- neode-ui/src/services/contextBroker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neode-ui/src/services/contextBroker.ts b/neode-ui/src/services/contextBroker.ts index f8b89ad6..d09bfd41 100644 --- a/neode-ui/src/services/contextBroker.ts +++ b/neode-ui/src/services/contextBroker.ts @@ -326,7 +326,8 @@ export class ContextBroker { if (s.scope === 'peers') { const byOnion = new Map() for (const it of items) { - const onion = typeof (it as { peer?: unknown }).peer === 'string' ? (it as { peer: string }).peer : '' + const peer: unknown = (it as { peer?: unknown }).peer + const onion = typeof peer === 'string' ? peer : '' if (!onion) continue byOnion.set(onion, [...(byOnion.get(onion) ?? []), it]) }