We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 626c224 commit 49bcf21Copy full SHA for 49bcf21
1 file changed
src/routers/createRouter.ts
@@ -65,7 +65,7 @@ export function bindEvent(target: EventTarget, type: string, handler: EventListe
65
}
66
67
export function scrollToHash(hash: string, fallbackTop?: boolean) {
68
- const el = querySelector(`#${hash}`);
+ const el = querySelector(`#${hash}`) ?? document.getElementById(hash);
69
if (el) {
70
el.scrollIntoView();
71
} else if (fallbackTop) {
0 commit comments