diff --git a/src/index.tsx b/src/index.tsx index bda04ea..760c24a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -241,7 +241,7 @@ const NextTopLoader = ({ if (newUrl) { const currentUrl = window.location.href; // const newUrl = (anchor as HTMLAnchorElement).href; - const isExternalLink = (anchor as HTMLAnchorElement).target === '_blank'; + const isExternalLink = !!(anchor as HTMLAnchorElement); // Check for Special Schemes const isSpecialScheme = ['tel:', 'mailto:', 'sms:', 'blob:', 'download:'].some((scheme) => @@ -356,4 +356,4 @@ NextTopLoader.propTypes = { shadow: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), zIndex: PropTypes.number, showAtBottom: PropTypes.bool, -}; +}; \ No newline at end of file