From 9d737e9519e455e69b95de2798de7aa466f175f0 Mon Sep 17 00:00:00 2001 From: tikagan <30419893+tikagan@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:52:51 -0500 Subject: [PATCH] fix: nav links work on all pages --- components/navbar.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/navbar.vue b/components/navbar.vue index e3272c3..85ab200 100644 --- a/components/navbar.vue +++ b/components/navbar.vue @@ -44,7 +44,8 @@ const scrollToSection = async (el) => { section: id } }) - section.scrollIntoView({ behavior: 'smooth' }) + const section = document.getElementById(id) + section.scrollIntoView({ behavior: "smooth" }) }