Skip to content

Commit d9b7c9f

Browse files
committed
fix: prevent callback execution for app-name-link when navigating to the same hash
1 parent 7ade001 commit d9b7c9f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/core/router/history/hash.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ export class HashHistory extends History {
4646
const el = e.target.tagName === 'A' ? e.target : e.target.parentNode;
4747

4848
if (el && el.tagName === 'A' && !isExternal(el.href)) {
49-
const hrefHash = new URL(el.href).hash;
50-
const currentHash = location.hash;
51-
5249
navigating = true;
5350

54-
if (hrefHash && hrefHash === currentHash) {
51+
if (el.className !== 'app-name-link' && el.hash === location.hash) {
5552
cb({ event: e, source: 'navigate' });
5653
}
5754
}

0 commit comments

Comments
 (0)