diff options
author | Zero~Informatique | 2020-04-04 02:24:10 +0200 |
---|---|---|
committer | Zero~Informatique | 2020-04-04 02:27:27 +0200 |
commit | 84090e0f534cfa8bf601ae6df21e5df695fd149a (patch) | |
tree | 76fc99b056027a9d756fd069b3da9df7d0c1bd5b | |
parent | ce04802f300ba627a3b9e9612d938b825045e63f (diff) | |
download | ldgallery-84090e0f534cfa8bf601ae6df21e5df695fd149a.tar.gz |
viewer: tag categories implementation
code cleaning
GitHub: Resolves #29
-rw-r--r-- | viewer/src/services/indexfactory.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/viewer/src/services/indexfactory.ts b/viewer/src/services/indexfactory.ts index 0a84951..25027f3 100644 --- a/viewer/src/services/indexfactory.ts +++ b/viewer/src/services/indexfactory.ts | |||
@@ -127,11 +127,7 @@ export default class IndexFactory { | |||
127 | .forEach(category => { | 127 | .forEach(category => { |
128 | tagsCategories.push(category); | 128 | tagsCategories.push(category); |
129 | 129 | ||
130 | if (!tagsIndex[category.tag].rootPart) | 130 | [category.tag, ...Object.values(category.index).map(node => node.tag)] |
131 | tagsRemaining.delete(category.tag); | ||
132 | |||
133 | Object.values(category.index) | ||
134 | .map(node => node.tag) | ||
135 | .filter(tag => !tagsIndex[tag].rootPart) | 131 | .filter(tag => !tagsIndex[tag].rootPart) |
136 | .forEach(tag => tagsRemaining.delete(tag)); | 132 | .forEach(tag => tagsRemaining.delete(tag)); |
137 | }); | 133 | }); |