mirror of
https://github.com/danbulant/Mangades
synced 2026-06-20 14:51:19 +00:00
fix skipping first navigation
This commit is contained in:
parent
f5d7d2108b
commit
dce011fcd3
1 changed files with 1 additions and 3 deletions
|
|
@ -10,12 +10,10 @@
|
|||
if(browser) {
|
||||
apm.setInitialPageLoadName($page.route.id);
|
||||
}
|
||||
|
||||
let skipFirst = true;
|
||||
|
||||
let last = typeof window !== "undefined" && window.location.pathname;
|
||||
afterNavigate(page => {
|
||||
if(!["link", "popstate"].includes(page.type)) return; // ignore post hydration and automatic goto
|
||||
if(skipFirst) return skipFirst = false;
|
||||
if(window.goatcounter) window.goatcounter.count({
|
||||
path: window.location.pathname,
|
||||
title: page.title,
|
||||
|
|
|
|||
Loading…
Reference in a new issue