Skip to content

Commit

Permalink
fix: App is crashing when the label is added first time (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsivin committed Sep 19, 2023
1 parent 6cf5304 commit b0de7eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/screens/ChatScreen/components/ConversationLabels.js
Expand Up @@ -135,7 +135,7 @@ const ConversationLabels = ({ colors, conversationDetails }) => {
if (conversationSavedLabels?.includes(label.title)) {
return false;
}
return label.title.toLowerCase().includes(search.toLowerCase());
return label.title.toLowerCase()?.includes(search.toLowerCase());
});

const createLabelEvent = () => {
Expand Down
Expand Up @@ -55,7 +55,7 @@ const CardLabel = ({ conversationDetails, conversationId }) => {
const activeLabels =
labels && conversationLabels
? labels.filter(({ title }) => {
return conversationLabels.includes(title);
return conversationLabels?.includes(title);
})
: [];

Expand Down
Expand Up @@ -55,7 +55,7 @@ const ConversationLabel = ({ conversationDetails, conversationId }) => {
const activeLabels =
labels && conversationLabels
? labels.filter(({ title }) => {
return conversationLabels.includes(title);
return conversationLabels?.includes(title);
})
: [];

Expand Down
2 changes: 1 addition & 1 deletion src/screens/ConversationDetails/components/LabelView.js
Expand Up @@ -67,7 +67,7 @@ const LabelView = ({ conversationDetails, conversationId, openLabelsBottomSheet
const activeLabels =
labels && savedLabels
? labels.filter(({ title }) => {
return savedLabels.includes(title);
return savedLabels?.includes(title);
})
: [];

Expand Down

0 comments on commit b0de7eb

Please sign in to comment.