File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ const NextTopLoader = (props: NextTopLoaderProps) => {
101101 navLink . addEventListener ( 'click' , ( event : MouseEvent ) => {
102102 let currentUrl = window . location . href ;
103103 let newUrl = ( event . currentTarget as HTMLAnchorElement ) . href ;
104+ let isExternalLink = ( event . currentTarget as HTMLAnchorElement ) . target === "_blank" ;
104105 function isAnchorOfCurrentUrl ( currentUrl : string , newUrl : string ) {
105106 const currentUrlObj = new URL ( currentUrl ) ;
106107 const newUrlObj = new URL ( newUrl ) ;
@@ -121,7 +122,7 @@ const NextTopLoader = (props: NextTopLoaderProps) => {
121122 return false ;
122123 }
123124 const isAnchor = isAnchorOfCurrentUrl ( currentUrl , newUrl ) ;
124- if ( newUrl === currentUrl || isAnchor ) {
125+ if ( newUrl === currentUrl || isAnchor || isExternalLink ) {
125126 NProgress . start ( ) ;
126127 NProgress . done ( ) ;
127128 [ ] . forEach . call ( npgclass , function ( el : Element ) {
You can’t perform that action at this time.
0 commit comments