diff --git a/src/api/endpoints/posts/search.ts b/src/api/endpoints/posts/search.ts index 777cd7909..bd3bbfc12 100644 --- a/src/api/endpoints/posts/search.ts +++ b/src/api/endpoints/posts/search.ts @@ -105,7 +105,7 @@ async function byNative(res, rej, me, text, userId, following, reply, repost, me }); } - if (following != null) { + if (following != null && me != null) { const ids = await getFriends(me._id, false); push({ user_id: following ? {