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 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-08-07 08:45:46 -04:00
co-authored by Claude
parent c25fd8b650
commit 3f22e4375d
+2 -1
View File
@@ -326,7 +326,8 @@ export class ContextBroker {
if (s.scope === 'peers') {
const byOnion = new Map<string, ArchyContentItem[]>()
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])
}