From 6ec1ffc39c165aebb8370e84d33f4e52f4359123 Mon Sep 17 00:00:00 2001 From: vandat1995 Date: Tue, 26 Sep 2023 13:11:00 +0700 Subject: [PATCH 1/2] fixed loader infinity when press control click --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index c8b00ef..11bde6e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -148,7 +148,7 @@ const NextTopLoader = ({ const newUrl = (anchor as HTMLAnchorElement).href; const isExternalLink = (anchor as HTMLAnchorElement).target === "_blank"; const isAnchor = isAnchorOfCurrentUrl(currentUrl, newUrl); - if (newUrl === currentUrl || isAnchor || isExternalLink) { + if (newUrl === currentUrl || isAnchor || isExternalLink || event.ctrlKey) { NProgress.start(); NProgress.done(); [].forEach.call(npgclass, function (el: Element) { From 54096397f9474f9583de2dbc7576becd094454a8 Mon Sep 17 00:00:00 2001 From: Shri Ganesh Jha <60005430+TheSGJ@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:50:59 +0545 Subject: [PATCH 2/2] fix isBlob --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index bc0994c..bea3773 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -157,7 +157,7 @@ const NextTopLoader = ({ const isExternalLink = (anchor as HTMLAnchorElement).target === '_blank'; const isBlob = newUrl.startsWith('blob:'); const isAnchor = isAnchorOfCurrentUrl(currentUrl, newUrl); - if (newUrl === currentUrl || isAnchor || isExternalLink || event.ctrlKey) { + if (newUrl === currentUrl || isAnchor || isExternalLink || isBlob || event.ctrlKey) { NProgress.start(); NProgress.done(); [].forEach.call(npgclass, function (el: Element) {