From 9531b9eb43b3a0e4965acdafd0ead443a82da36c Mon Sep 17 00:00:00 2001 From: Shri Ganesh Jha <60005430+TheSGJ@users.noreply.github.com> Date: Thu, 16 Mar 2023 18:59:10 +0545 Subject: [PATCH] Update index.tsx --- src/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 07fcfe9..19d0be5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -102,7 +102,6 @@ const NextTopLoader = (props: NextTopLoaderProps) => { let currentUrl = window.location.href; let newUrl = (event.currentTarget as HTMLAnchorElement).href; let isExternalLink = (event.currentTarget as HTMLAnchorElement).target === "_blank"; - if (isExternalLink) return null; function isAnchorOfCurrentUrl(currentUrl: string, newUrl: string) { const currentUrlObj = new URL(currentUrl); const newUrlObj = new URL(newUrl); @@ -123,7 +122,7 @@ const NextTopLoader = (props: NextTopLoaderProps) => { return false; } const isAnchor = isAnchorOfCurrentUrl(currentUrl, newUrl); - if (newUrl === currentUrl || isAnchor) { + if (newUrl === currentUrl || isAnchor || isExternalLink) { NProgress.start(); NProgress.done(); [].forEach.call(npgclass, function (el: Element) {