From 74c1c5e34787ac57299c8cbd874e9dcc56da406d Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 22 May 2020 04:14:48 +0200 Subject: viewer: Enumerated item types --- viewer/src/services/indexfactory.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'viewer/src/services/indexfactory.ts') 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 @@ */ import { Operation } from "@/@types/Operation"; +import { ItemType } from "@/@types/ItemType"; import Navigation from "@/services/navigation"; export default class IndexFactory { @@ -30,7 +31,7 @@ export default class IndexFactory { // Pushes all tags for a root item (and its children) to the index private static pushTagsForItem(tagsIndex: Tag.Index, item: Gallery.Item): void { - if (item.properties.type === "directory") { + if (item.properties.type === ItemType.DIRECTORY) { item.properties.items.forEach(item => this.pushTagsForItem(tagsIndex, item)); return; // Directories are not indexed } -- cgit v1.2.3