Fix tag display issue

This commit is contained in:
2020-06-19 21:04:45 -04:00
parent dc2e4443c4
commit 74cc898259
3 changed files with 5 additions and 2 deletions

View File

@@ -250,12 +250,13 @@ function addTag(map, tag, id, count) {
let child = {
id: id,
text: tags.length !== 1 ? tags[0] : `${tags[0]} (${count})`,
name: tags[0],
children: []
};
let found = false;
map.forEach(node => {
if (node.text === child.text) {
if (node.name === child.name) {
found = true;
if (tags.length !== 1) {
addTag(node.children, tags.slice(1).join("."), id, count);