diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue index 69e25cdfd..cacb3d551 100644 --- a/src/components/common/VnSection.vue +++ b/src/components/common/VnSection.vue @@ -51,7 +51,7 @@ const router = useRouter(); let arrayData; const sectionValue = computed(() => $props.section ?? $props.dataKey); -const isMainSection = ref(); +const isMainSection = ref(false); const searchbarId = 'section-searchbar'; const hasContent = useHasContent(`#${searchbarId}`); @@ -71,7 +71,7 @@ onMounted(() => { const unsubscribe = router.afterEach(() => { checkIsMain(); }); - onUnmounted(() => unsubscribe()); + onUnmounted(unsubscribe); }); function checkIsMain() {