Skip to content

Commit 475e400

Browse files
committed
fix: move isActive parent before watcher
1 parent 641ae05 commit 475e400

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

frontend/src/components/sidebar/Sidebar.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ const route = useRoute()
5454
const { t } = useI18n()
5555
const emit = defineEmits(['createView', 'editView', 'deleteView', 'createConversation'])
5656
57+
const isActiveParent = (parentHref) => {
58+
return route.path.startsWith(parentHref)
59+
}
60+
61+
const isInboxRoute = (path) => {
62+
return path.startsWith('/inboxes')
63+
}
64+
5765
const openCreateViewDialog = () => {
5866
emit('createView')
5967
}
@@ -94,14 +102,6 @@ watch(
94102
const sidebarOpen = useStorage('mainSidebarOpen', true)
95103
const teamInboxOpen = useStorage('teamInboxOpen', true)
96104
const viewInboxOpen = useStorage('viewInboxOpen', true)
97-
98-
const isActiveParent = (parentHref) => {
99-
return route.path.startsWith(parentHref)
100-
}
101-
102-
const isInboxRoute = (path) => {
103-
return path.startsWith('/inboxes')
104-
}
105105
</script>
106106

107107
<template>

0 commit comments

Comments
 (0)