Skip to content

Commit 52da903

Browse files
authored
Merge pull request #123 from TheSGJ/revert-109-external-link-condition
Revert "fix bug: target is customizable"
2 parents 9f81708 + 31b315a commit 52da903

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ const NextTopLoader = ({
242242
if (newUrl) {
243243
const currentUrl = window.location.href;
244244
// const newUrl = (anchor as HTMLAnchorElement).href;
245-
const isExternalLink = !!(anchor as HTMLAnchorElement);
245+
const isExternalLink = (anchor as HTMLAnchorElement).target === '_blank';
246246

247247
// Check for Special Schemes
248248
const isSpecialScheme = ['tel:', 'mailto:', 'sms:', 'blob:', 'download:'].some((scheme) =>

0 commit comments

Comments
 (0)