fix: existence check of searchParams in NavigationItem (#24877)

This commit is contained in:
Eunjae Lee authored and GitHub committed 2025-11-03 16:42:31 +00:00
1 parent 4659d08c07
commit 763c568797
1 file changed
+1 -1
@@ -46,7 +46,7 @@ const useBuildHref = () => {
childItem.preserveQueryParams &&
childItem.preserveQueryParams({ prevPathname: prevPathnameRef.current, nextPathname: childItem.href })
) {
const params = searchParams.toString();
const params = searchParams?.toString();
return params ? `${childItem.href}?${params}` : childItem.href;
}
return childItem.href;