diff options
author | Zero~Informatique | 2020-02-23 18:18:17 +0100 |
---|---|---|
committer | Zero~Informatique | 2020-02-24 00:04:40 +0100 |
commit | 1915fd6e8b7b0c83a9a1b9254fd945f1cc0c7c19 (patch) | |
tree | ac6c4f871b5cae15995b0e1f5bc19e6df645239b /viewer | |
parent | aacf4f902370c779cd5e64c217c061d3d044c742 (diff) | |
download | ldgallery-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.vue | 5 |
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 | } |