We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 401048c + a363e6f commit eb236dfCopy full SHA for eb236df
components/navbar.vue
@@ -38,16 +38,13 @@ const emit = defineEmits(['nav-link-click'])
38
const scrollToSection = async (el) => {
39
emit('nav-link-click')
40
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
+ await navigateTo({
+ path: '/',
+ query: {
+ section: id
+ }
+ })
+ section.scrollIntoView({ behavior: 'smooth' })
51
}
52
</script>
53
0 commit comments