diff options
author | Zero~Informatique | 2020-05-22 04:14:48 +0200 |
---|---|---|
committer | OzoneGrif | 2020-05-22 04:39:18 +0200 |
commit | 74c1c5e34787ac57299c8cbd874e9dcc56da406d (patch) | |
tree | 51da8090667290bc27e3580b9a78271ddf4d0e3a /viewer/src/services/indexfactory.ts | |
parent | e20f99b74b55fdb3edbcfe5bfdb700fc1a5e9574 (diff) | |
download | ldgallery-74c1c5e34787ac57299c8cbd874e9dcc56da406d.tar.gz |
viewer: Enumerated item types
Diffstat (limited to 'viewer/src/services/indexfactory.ts')
-rw-r--r-- | viewer/src/services/indexfactory.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/viewer/src/services/indexfactory.ts b/viewer/src/services/indexfactory.ts index e402185..00abc05 100644 --- a/viewer/src/services/indexfactory.ts +++ b/viewer/src/services/indexfactory.ts | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | import { Operation } from "@/@types/Operation"; | 20 | import { Operation } from "@/@types/Operation"; |
21 | import { ItemType } from "@/@types/ItemType"; | ||
21 | import Navigation from "@/services/navigation"; | 22 | import Navigation from "@/services/navigation"; |
22 | 23 | ||
23 | export default class IndexFactory { | 24 | export default class IndexFactory { |
@@ -30,7 +31,7 @@ export default class IndexFactory { | |||
30 | 31 | ||
31 | // Pushes all tags for a root item (and its children) to the index | 32 | // Pushes all tags for a root item (and its children) to the index |
32 | private static pushTagsForItem(tagsIndex: Tag.Index, item: Gallery.Item): void { | 33 | private static pushTagsForItem(tagsIndex: Tag.Index, item: Gallery.Item): void { |
33 | if (item.properties.type === "directory") { | 34 | if (item.properties.type === ItemType.DIRECTORY) { |
34 | item.properties.items.forEach(item => this.pushTagsForItem(tagsIndex, item)); | 35 | item.properties.items.forEach(item => this.pushTagsForItem(tagsIndex, item)); |
35 | return; // Directories are not indexed | 36 | return; // Directories are not indexed |
36 | } | 37 | } |