File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ const NextTopLoader = ({
112112 ! shadow && shadow !== undefined
113113 ? ''
114114 : shadow
115- ? `box-shadow:${ shadow } `
116- : `box-shadow:0 0 10px ${ color } ,0 0 5px ${ color } ` ;
115+ ? `box-shadow:${ shadow } `
116+ : `box-shadow:0 0 10px ${ color } ,0 0 5px ${ color } ` ;
117117
118118 // Check if to show at bottom
119119 const positionStyle = showAtBottom ? 'bottom: 0;' : 'top: 0;' ;
@@ -270,7 +270,7 @@ const NextTopLoader = ({
270270 }
271271
272272 /**
273- * Complete TopLoader Progress
273+ * Complete TopLoader Progress on adding new entry to history stack
274274 * @param {History }
275275 * @returns {void }
276276 */
@@ -283,6 +283,20 @@ const NextTopLoader = ({
283283 } ;
284284 } ) ( ( window as Window ) . history ) ;
285285
286+ /**
287+ * Complete TopLoader Progress on replacing current entry of history stack
288+ * @param {History }
289+ * @returns {void }
290+ */
291+ ( ( history : History ) : void => {
292+ const replaceState = history . replaceState ;
293+ history . replaceState = ( ...args ) => {
294+ NProgress . done ( ) ;
295+ removeNProgressClass ( ) ;
296+ return replaceState . apply ( history , args ) ;
297+ } ;
298+ } ) ( ( window as Window ) . history ) ;
299+
286300 function handlePageHide ( ) : void {
287301 NProgress . done ( ) ;
288302 removeNProgressClass ( ) ;
You can’t perform that action at this time.
0 commit comments