From e6c2a8d9653ffde924632ca2f260c3a8cddc14ed Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 11 Sep 2020 00:15:04 +0200 Subject: viewer: item display order github: resolves #28 --- viewer/src/store/galleryStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer/src/store/galleryStore.ts') diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts index 5458f20..768adb6 100644 --- a/viewer/src/store/galleryStore.ts +++ b/viewer/src/store/galleryStore.ts @@ -31,7 +31,7 @@ export default class GalleryStore extends VuexModule { galleryIndex: Gallery.Index | null = null; tagsIndex: Tag.Index = {}; tagsCategories: Tag.Category[] = []; - currentPath: string = "/"; + currentPath: string | null = null; currentSearch: Tag.Search[] = []; // --- @@ -64,7 +64,7 @@ export default class GalleryStore extends VuexModule { get currentItemPath(): Gallery.Item[] { const root = this.galleryIndex?.tree; - if (root) return Navigation.searchCurrentItemPath(root, this.currentPath); + if (root && this.currentPath) return Navigation.searchCurrentItemPath(root, this.currentPath); return []; } -- cgit v1.2.3