fix: existence check of searchParams in NavigationItem (#24877)
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user