aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}