From 40e0b6fd90f887894add9dbf01dcd208e9f7ffb7 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Wed, 25 Jan 2023 12:22:43 -0500 Subject: [PATCH] chore: forward 'to' along to RR Signed-off-by: Logan McAnsh --- packages/remix-react/components.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/remix-react/components.tsx b/packages/remix-react/components.tsx index 9cb83a4fe17..d73747f4aa9 100644 --- a/packages/remix-react/components.tsx +++ b/packages/remix-react/components.tsx @@ -296,7 +296,6 @@ function usePrefetchBehavior( */ let NavLink = React.forwardRef( ({ to, prefetch = "none", ...props }, forwardedRef) => { - // `location` is the unaltered href we will render in the tag for absolute URLs let location = typeof to === "string" ? to : createPath(to); let isAbsolute = /^[a-z+]+:\/\//i.test(location) || location.startsWith("//"); @@ -310,7 +309,7 @@ let NavLink = React.forwardRef( <> @@ -332,7 +331,6 @@ export { NavLink }; */ let Link = React.forwardRef( ({ to, prefetch = "none", children, ...props }, forwardedRef) => { - // `location` is the unaltered href we will render in the tag for absolute URLs let location = typeof to === "string" ? to : createPath(to); let isAbsolute = /^[a-z+]+:\/\//i.test(location) || location.startsWith("//");