posthog-js
posthog-js copied to clipboard
feat: Warn user when calling .init with an invalid token
Current behavior:
Calling .init with a token value that is undefined (as in my case, a .env var what wasn't being set properly), the JS PostHog library doesn't error, and doesn't call the loaded method/callback (fails silently)
Expected behavior:
Posthog library should warn if token or api_host URL parameters are undefined/null.