Skip to content

Commit

Permalink
Fix tag id creation crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Pröschel committed Feb 23, 2021
1 parent 88547dd commit a935e91
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ const ConversationMetadata = (props: ConnectedProps<typeof connector>) => {
};

const filterForUnusedTags = (tags: TagModel[]): TagModel[] => {
return tags.filter(tag => !(tag.id in conversation.metadata.tags));
return tags.filter(tag => !(tag.id in (conversation.metadata.tags || {})));
};

const filterForUsedTags = (tags: TagModel[]): TagModel[] => {
return tags.filter(tag => tag.id in conversation.metadata.tags);
return tags.filter(tag => tag.id in (conversation.metadata.tags || {}));
};

const tagSorter = (tagA: TagModel, tagB: TagModel) => {
Expand Down

0 comments on commit a935e91

Please sign in to comment.