Update chats.component.ts

This commit is contained in:
Milad Raeisi
2024-09-21 01:00:57 +04:00
parent b597312fc4
commit 65256f80cd

View File

@@ -118,8 +118,9 @@ export class ChatsComponent implements OnInit, OnDestroy {
}
this.filteredChats = this.chats.filter((chat) =>
chat.contact.name.toLowerCase().includes(query.toLowerCase())
(chat.contact.name ? chat.contact.name.toLowerCase() : '').includes(query.toLowerCase())
);
}
/**