Skip to content

Commit

Permalink
Fixed: Issue searching for artist in the UI when tag is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Qstick committed Aug 10, 2019
1 parent 68e11a5 commit 9ca81eb
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -25,9 +25,15 @@ function createCleanArtistSelector() {
sortName,
foreignArtistId,
images,
tags: tags.map((id) => {
return allTags.find((tag) => tag.id === id);
})
tags: tags.reduce((acc, id) => {
const matchingTag = allTags.find((tag) => tag.id === id);

if (matchingTag) {
acc.push(matchingTag);
}

return acc;
}, [])
};
});
}
Expand Down

0 comments on commit 9ca81eb

Please sign in to comment.