Skip to content

Commit a363e6f

Browse files
committed
fix: nav jumplinks for index page navigate correctly from signup page
1 parent 8c50abd commit a363e6f

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

components/navbar.vue

+7-10
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,13 @@ const emit = defineEmits(['nav-link-click'])
3838
const scrollToSection = async (el) => {
3939
emit('nav-link-click')
4040
const id = el.replaceAll('#', '')
41-
const section = document.getElementById(id)
42-
if (section) {
43-
await navigateTo({
44-
path: '/',
45-
query: {
46-
section: id
47-
}
48-
})
49-
section.scrollIntoView({ behavior: 'smooth' })
50-
}
41+
await navigateTo({
42+
path: '/',
43+
query: {
44+
section: id
45+
}
46+
})
47+
section.scrollIntoView({ behavior: 'smooth' })
5148
}
5249
</script>
5350

0 commit comments

Comments
 (0)