diff --git a/src/posthog-core.ts b/src/posthog-core.ts index 9be84c556..cbd4e6d7b 100644 --- a/src/posthog-core.ts +++ b/src/posthog-core.ts @@ -286,7 +286,7 @@ export class PostHog { // Legacy property to support existing usage - this isn't technically correct but it's what it has always been - a proxy for flags being loaded public get decideEndpointWasHit(): boolean { - return this.featureFlags.hasLoadedFlags + return this.featureFlags?.hasLoadedFlags ?? false } /** DEPRECATED: We keep this to support existing usage but now one should just call .setPersonProperties */