diff --git a/packages/bsky/src/api/app/bsky/actor/searchActors.ts b/packages/bsky/src/api/app/bsky/actor/searchActors.ts index 4fcb29de089..66e934ac0b3 100644 --- a/packages/bsky/src/api/app/bsky/actor/searchActors.ts +++ b/packages/bsky/src/api/app/bsky/actor/searchActors.ts @@ -47,6 +47,7 @@ export default function (server: Server, ctx: AppContext) { const SKIP = [] const filtered = results.flatMap((did) => { const actor = actors[did] + if (!actor) return SKIP if (actor.viewer?.blocking || actor.viewer?.blockedBy) return SKIP return actor }) diff --git a/packages/bsky/src/api/app/bsky/actor/searchActorsTypeahead.ts b/packages/bsky/src/api/app/bsky/actor/searchActorsTypeahead.ts index 9c09a54ac7e..ff674edf898 100644 --- a/packages/bsky/src/api/app/bsky/actor/searchActorsTypeahead.ts +++ b/packages/bsky/src/api/app/bsky/actor/searchActorsTypeahead.ts @@ -40,6 +40,7 @@ export default function (server: Server, ctx: AppContext) { const SKIP = [] const filtered = results.flatMap((did) => { const actor = actors[did] + if (!actor) return SKIP if (actor.viewer?.blocking || actor.viewer?.blockedBy) return SKIP return actor })