diff --git a/examples/next/src/app/fathom.tsx b/examples/next/src/app/fathom.tsx index 4f967910..efac2475 100644 --- a/examples/next/src/app/fathom.tsx +++ b/examples/next/src/app/fathom.tsx @@ -20,7 +20,7 @@ function TrackPageView() { if (!pathname) return; trackPageview({ - url: pathname + searchParams.toString(), + url: pathname + searchParams?.toString() ?? "", referrer: document.referrer, }); }, [pathname, searchParams]);