mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
Merge branch 'patch-1' of https://github.com/thgh/sapper into thgh-patch-1
This commit is contained in:
@@ -208,7 +208,7 @@ export function init(_target: Node, _routes: Route[]) {
|
||||
setTimeout(() => {
|
||||
const { hash, href } = window.location;
|
||||
|
||||
const deep_linked = hash && document.querySelector(hash);
|
||||
const deep_linked = hash && document.getElementById(hash.slice(1));
|
||||
scroll_history[uid] = deep_linked ?
|
||||
{ x: 0, y: deep_linked.getBoundingClientRect().top } :
|
||||
scroll_state();
|
||||
|
||||
Reference in New Issue
Block a user