fix: goatcounter onload error

This commit is contained in:
2023-01-11 18:13:52 +01:00
parent a236c662af
commit d3d1bb24d7
+6 -3
View File
@@ -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 (