minor tweaks

This commit is contained in:
Rich Harris
2018-10-05 20:57:15 -04:00
parent 05b702938f
commit 3f586e19a1
2 changed files with 6 additions and 5 deletions

View File

@@ -102,9 +102,9 @@ function handle_click(event: MouseEvent) {
if (url.pathname === location.pathname && url.search === location.search) return;
const target = select_route(url);
const has_scroll = a.hasAttribute('sapper-noscroll')
if (target) {
navigate(target, null, has_scroll);
const noscroll = a.hasAttribute('sapper-noscroll')
navigate(target, null, noscroll);
event.preventDefault();
history.pushState({ id: cid }, '', url.href);
}