From 68f7d6cf7b0cd8eca005a08523a87cf13a0682d4 Mon Sep 17 00:00:00 2001 From: Jan Potoms <2109932+Janpot@users.noreply.github.com> Date: Fri, 3 Jul 2020 04:53:04 +0200 Subject: [PATCH] trigger rebuild --- packages/next/client/link.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/client/link.tsx b/packages/next/client/link.tsx index 1020c29e1681b..8bdcfbae0b9a6 100644 --- a/packages/next/client/link.tsx +++ b/packages/next/client/link.tsx @@ -114,7 +114,7 @@ function prefetch( } }) // Join on an invalid URI character - prefetched[href + '%' + as] = true + prefetched[href + '%' + (as || href)] = true } function linkClicked( @@ -192,7 +192,7 @@ function Link(props: React.PropsWithChildren) { React.useEffect(() => { if (p && IntersectionObserver && childElm && childElm.tagName) { // Join on an invalid URI character - const isPrefetched = prefetched[href + '%' + as] + const isPrefetched = prefetched[href + '%' + (as || href)] if (!isPrefetched) { return listenToIntersections(childElm, () => { prefetch(router, href, as)