aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
authorZero~Informatique2020-02-23 18:18:17 +0100
committerZero~Informatique2020-02-24 00:04:40 +0100
commit1915fd6e8b7b0c83a9a1b9254fd945f1cc0c7c19 (patch)
treeac6c4f871b5cae15995b0e1f5bc19e6df645239b /viewer
parentaacf4f902370c779cd5e64c217c061d3d044c742 (diff)
downloadldgallery-1915fd6e8b7b0c83a9a1b9254fd945f1cc0c7c19.tar.gz
viewer: go to parent command fix when in search mode
Code review fix
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/components/LdCommand.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue
index 468c241..c0b86be 100644
--- a/viewer/src/components/LdCommand.vue
+++ b/viewer/src/components/LdCommand.vue
@@ -46,11 +46,12 @@ export default class LdCommand extends Vue {
46 } 46 }
47 47
48 isRoot(): boolean { 48 isRoot(): boolean {
49 return this.currentItemPath.length <= 1; 49 return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode;
50 } 50 }
51 51
52 parent(): RawLocation { 52 parent(): RawLocation {
53 if (!this.isRoot()) return this.currentItemPath[this.currentItemPath.length - 2]; 53 if (this.$uiStore.searchMode) return this.$route.path;
54 if (this.currentItemPath.length > 1) return this.currentItemPath[this.currentItemPath.length - 2];
54 return ""; 55 return "";
55 } 56 }
56} 57}