diff --git a/ts/state/selectors/search.ts b/ts/state/selectors/search.ts index cc6d81aad..b8a963d27 100644 --- a/ts/state/selectors/search.ts +++ b/ts/state/selectors/search.ts @@ -25,6 +25,11 @@ export const getSearchResults = createSelector( searchState.contactsAndGroups.map(id => { const value = lookup[id]; + // on some edges cases, we have an id but no corresponding convo because it matches a query but the conversation was removed. + if (!value) { + return null; + } + // Don't return anything when activeAt is unset (i.e. no current conversations with this user) if (value.activeAt === undefined || value.activeAt === 0) { //activeAt can be 0 when linking device