diff --git a/typescript/fiddle-frontend/app/PostHogPageView.tsx b/typescript/fiddle-frontend/app/PostHogPageView.tsx index 5dae22911..b875ff763 100644 --- a/typescript/fiddle-frontend/app/PostHogPageView.tsx +++ b/typescript/fiddle-frontend/app/PostHogPageView.tsx @@ -13,7 +13,7 @@ export default function PostHogPageView(): null { useEffect(() => { if (pathname && posthog) { let url = window.origin + pathname - if (searchParams.toString()) { + if (searchParams?.toString()) { url = url + `?${searchParams.toString()}` } posthog.capture('$pageview', {