Skip to content

Commit

Permalink
fix: Stop logging error when client is uninitialized (#1803)
Browse files Browse the repository at this point in the history
This causes errors on NextJS because it will be uninitialized on the server-side. We already make it pretty clear that you should control initializing the client when passing it in as a prop, so let's give up on the error log altogether
  • Loading branch information
rafaeelaudibert authored Mar 7, 2025
1 parent e245663 commit 02c7ec3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions react/src/context/PostHogProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ export function PostHogProvider({ children, client, apiKey, options }: WithOptio
)
}

if (!client.__loaded) {
console.warn('[PostHog.js] you should provide an _initialized_ `client` to `PostHogProvider` .')
}

return client
}

Expand Down

0 comments on commit 02c7ec3

Please sign in to comment.