fix: goatcounter onload error
This commit is contained in:
+6
-3
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user