From 5812a3422f8b6be7afbeaaa140d7d555feb3206f Mon Sep 17 00:00:00 2001
From: Christopher Ng <chrng8@gmail.com>
Date: Tue, 30 Jul 2024 18:19:55 -0700
Subject: fix(files): Fix root crumb not marking navigation entry as active

Signed-off-by: Christopher Ng <chrng8@gmail.com>
---
 apps/files/src/components/BreadCrumbs.vue | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'apps/files/src/components/BreadCrumbs.vue')

diff --git a/apps/files/src/components/BreadCrumbs.vue b/apps/files/src/components/BreadCrumbs.vue
index 21777562d18..e42efeb6a85 100644
--- a/apps/files/src/components/BreadCrumbs.vue
+++ b/apps/files/src/components/BreadCrumbs.vue
@@ -163,6 +163,13 @@ export default defineComponent({
 		},
 
 		getTo(dir: string, node?: Node): Record<string, unknown> {
+			if (dir === '/') {
+				return {
+					...this.$route,
+					params: { view: this.currentView?.id },
+					query: {},
+				}
+			}
 			if (node === undefined) {
 				return {
 					...this.$route,
-- 
cgit v1.2.3

