You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm experiencing a bug when using onFeatureFlags and the Posthog JS snippet. If I call onFeatureFlags before Posthog has loaded, then Posthog throws an error when the feature flags load.
I have the following snippet which, to my understanding, sets window.posthog.onFeatureFlags with a placeholder function and asynchronously loads the full posthog library.
If I call window.posthog.onFeatureFlags before posthog.__loaded is true, it will properly execute but throw whenever the feature flags load (and callbacks are triggered).
Below is the line that throws:
and when inspecting featureFlagEventHandlers you can see that it's an array of a single array (rather than an array of functions like the code expects).
The text was updated successfully, but these errors were encountered:
Hello, I'm experiencing a bug when using
onFeatureFlags
and the Posthog JS snippet. If I callonFeatureFlags
before Posthog has loaded, then Posthog throws an error when the feature flags load.I have the following snippet which, to my understanding, sets
window.posthog.onFeatureFlags
with a placeholder function and asynchronously loads the full posthog library.If I call
window.posthog.onFeatureFlags
beforeposthog.__loaded
is true, it will properly execute but throw whenever the feature flags load (and callbacks are triggered).Below is the line that throws:
and when inspecting
featureFlagEventHandlers
you can see that it's an array of a single array (rather than an array of functions like the code expects).The text was updated successfully, but these errors were encountered: