Fix calling isListed on undefined chat

This commit is contained in:
Alexander Zinchuk 2021-12-04 13:44:29 +01:00
parent 652be2823c
commit baa92eb1b3

View File

@ -282,8 +282,9 @@ export function prepareFolderListIds(
const pinnedChatIds = folder.excludedChatIds ? new Set(folder.pinnedChatIds) : undefined;
const listIds = ([] as string[]).concat(allListIds.active || [], allListIds.archived || [])
.filter((id) => {
return filterChatFolder(
chatsById[id],
const chat = chatsById[id];
return chat && filterChatFolder(
chat,
folder,
usersById,
notifySettings,