Skip to content

Commit

Permalink
Update chats.component.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
miladsoft committed Sep 20, 2024
1 parent b597312 commit 65256f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/chat/chats/chats.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
);

}

/**
Expand Down

0 comments on commit 65256f8

Please sign in to comment.