Skip to content

Commit

Permalink
narrow the condition to ignore only when target is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 committed Aug 15, 2024
1 parent cee9f1f commit f8fb7ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nextjs/components/scaffold-eth/ProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export function ProgressBar() {
const anchor = event.currentTarget as HTMLAnchorElement;
const targetUrl = anchor.href;
const currentUrl = location.href;
if (targetUrl !== currentUrl && !anchor.target) {
const isTargetBlank = anchor?.target === "_blank";
if (targetUrl !== currentUrl && !isTargetBlank) {
NProgress.start();
}
};
Expand Down

0 comments on commit f8fb7ac

Please sign in to comment.