We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c50abd commit a363e6fCopy full SHA for a363e6f
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