diff options
author | Zero~Informatique | 2020-09-11 00:15:04 +0200 |
---|---|---|
committer | G.Fouet | 2020-09-11 21:53:18 +0200 |
commit | e6c2a8d9653ffde924632ca2f260c3a8cddc14ed (patch) | |
tree | ccc847bdec26d131ee260203410d7a16a0a6fbcf /viewer/src/store/galleryStore.ts | |
parent | d72e317896bcc2a675d21cec6f286e0b2730d77c (diff) | |
download | ldgallery-e6c2a8d9653ffde924632ca2f260c3a8cddc14ed.tar.gz |
viewer: item display order
github: resolves #28
Diffstat (limited to 'viewer/src/store/galleryStore.ts')
-rw-r--r-- | viewer/src/store/galleryStore.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
31 | galleryIndex: Gallery.Index | null = null; | 31 | galleryIndex: Gallery.Index | null = null; |
32 | tagsIndex: Tag.Index = {}; | 32 | tagsIndex: Tag.Index = {}; |
33 | tagsCategories: Tag.Category[] = []; | 33 | tagsCategories: Tag.Category[] = []; |
34 | currentPath: string = "/"; | 34 | currentPath: string | null = null; |
35 | currentSearch: Tag.Search[] = []; | 35 | currentSearch: Tag.Search[] = []; |
36 | 36 | ||
37 | // --- | 37 | // --- |
@@ -64,7 +64,7 @@ export default class GalleryStore extends VuexModule { | |||
64 | 64 | ||
65 | get currentItemPath(): Gallery.Item[] { | 65 | get currentItemPath(): Gallery.Item[] { |
66 | const root = this.galleryIndex?.tree; | 66 | const root = this.galleryIndex?.tree; |
67 | if (root) return Navigation.searchCurrentItemPath(root, this.currentPath); | 67 | if (root && this.currentPath) return Navigation.searchCurrentItemPath(root, this.currentPath); |
68 | return []; | 68 | return []; |
69 | } | 69 | } |
70 | 70 | ||