fix: goatcounter onload error

pull/1/head
Antonio De Lucreziis 2 years ago
parent a236c662af
commit d3d1bb24d7

@ -34,9 +34,12 @@ export const App = ({ url }: { url?: string }) => {
const handleRouteChange = () => {
// @ts-ignore
window.goatcounter.count({
path: location.pathname + location.search + location.hash,
})
if (window.goatcounter) {
// @ts-ignore
window.goatcounter.count({
path: location.pathname + location.search + location.hash,
})
}
}
return (

Loading…
Cancel
Save