diff --git a/client/App.tsx b/client/App.tsx index 91dccc5..26bc63f 100644 --- a/client/App.tsx +++ b/client/App.tsx @@ -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 (