From d8c506e148e42358be8380dd37763d4ec9ab0e55 Mon Sep 17 00:00:00 2001 From: Riley Abrahamson <32375220+RileyAbr@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:40:19 -0800 Subject: [PATCH] Update Header.tsx --- wally-registry-frontend/src/components/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wally-registry-frontend/src/components/Header.tsx b/wally-registry-frontend/src/components/Header.tsx index 89f3ae4..bfc7fc5 100644 --- a/wally-registry-frontend/src/components/Header.tsx +++ b/wally-registry-frontend/src/components/Header.tsx @@ -312,7 +312,7 @@ export default function Header() { const router = useRouter() const pathname = usePathname() - const currentParentPage = pathname.split("/")[1] + const currentParentPage = pathname ? pathname.split("/")[1] : "" const loadOptions = async (inputValue: string) => new Promise((resolve) => {