Skip to content

Calling reset() causes feature flags lost #203

@ugurcany

Description

@ugurcany

Version

5.4.1

Steps to Reproduce

  1. Call await Posthog().reset() after user logs out on frontend
  2. All await Posthog().isFeatureEnabled("feature-key") calls return false afterwards.

Expected Result

Resetting after user logout should still keep the prefetched feature flags.

Actual Result

Preloaded feature flags are lost. However, if I call await Posthog().reloadFeatureFlags() after reset, they are working fine. Not sure if this should be required though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions