Skip to content

Commit

Permalink
Merge pull request #40 from vandat1995/update/clear_loader_when_press…
Browse files Browse the repository at this point in the history
…_control_click

fixed loader infinity when press control click
  • Loading branch information
TheSGJ authored Oct 16, 2023
2 parents c26303d + 5409639 commit 894552f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +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 || isBlob) {
if (newUrl === currentUrl || isAnchor || isExternalLink || isBlob || event.ctrlKey) {
NProgress.start();
NProgress.done();
[].forEach.call(npgclass, function (el: Element) {
Expand Down

0 comments on commit 894552f

Please sign in to comment.