next-nprogress-bar
Advanced tools
Comparing version 2.3.13 to 2.3.14
@@ -29,2 +29,3 @@ /// <reference types="react" /> | ||
* @param disableAnchorClick Disable triggering progress bar on anchor clicks - @default false | ||
* @param disableSameURL Disable triggering progress bar on the same URL - @default true | ||
*/ | ||
@@ -31,0 +32,0 @@ export interface ProgressBarProps { |
@@ -122,2 +122,4 @@ 'use strict'; | ||
timer = setTimeout(function () { | ||
if (!NProgress.isStarted()) | ||
return; | ||
NProgress.done(); | ||
@@ -295,2 +297,4 @@ }, stopDelay); | ||
timer = setTimeout(function () { | ||
if (!NProgress.isStarted()) | ||
return; | ||
NProgress.done(true); | ||
@@ -302,4 +306,6 @@ }, stopDelay); | ||
var currentUrl = new URL(Router.route, location.href); | ||
if (!shallowRouting || | ||
(!isSameURL(targetUrl, currentUrl) && disableSameURL)) { | ||
if ((!shallowRouting || | ||
(isSameURL(targetUrl, currentUrl) && !disableSameURL) || | ||
!isSameURL(targetUrl, currentUrl)) && | ||
!NProgress.isStarted()) { | ||
startProgress(); | ||
@@ -306,0 +312,0 @@ } |
{ | ||
"name": "next-nprogress-bar", | ||
"version": "2.3.13", | ||
"version": "2.3.14", | ||
"description": "NextJS progress bar compatible with new app directory", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
78253
431