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:
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user