Skip to content

Commit 10b1fc3

Browse files
committed
fix: the uncaught typeerror when el is null
1 parent 78775b6 commit 10b1fc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/router/history/hash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class HashHistory extends History {
3939
on('click', e => {
4040
const el = e.target.tagName === 'A' ? e.target : e.target.parentNode;
4141

42-
if (el.tagName === 'A' && !/_blank/.test(el.target)) {
42+
if (el && el.tagName === 'A' && !/_blank/.test(el.target)) {
4343
navigating = true;
4444
}
4545
});

0 commit comments

Comments
 (0)