fix: goatcounter onload error
This commit is contained in:
+6
-3
@@ -34,9 +34,12 @@ export const App = ({ url }: { url?: string }) => {
|
|||||||
|
|
||||||
const handleRouteChange = () => {
|
const handleRouteChange = () => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
window.goatcounter.count({
|
if (window.goatcounter) {
|
||||||
path: location.pathname + location.search + location.hash,
|
// @ts-ignore
|
||||||
})
|
window.goatcounter.count({
|
||||||
|
path: location.pathname + location.search + location.hash,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user