From 2cff552fbabab97d5fac303bf2c1963877abb86b Mon Sep 17 00:00:00 2001 From: Ben White Date: Wed, 4 Dec 2024 13:29:36 +0100 Subject: [PATCH] Fixes --- src/posthog-core.ts | 6 ------ src/site-apps.ts | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/src/posthog-core.ts b/src/posthog-core.ts index e26ec2abb..920709306 100644 --- a/src/posthog-core.ts +++ b/src/posthog-core.ts @@ -545,8 +545,6 @@ export class PostHog { } _onRemoteConfig(config: RemoteConfig) { - // TODO: check config. If "hasFlags" is anything other than false - load the flags from decide (later will be /flags) - this.compression = undefined if (config.supportedCompression && !this.config.disable_compression) { this.compression = includes(config['supportedCompression'], Compression.GZipJS) @@ -576,10 +574,6 @@ export class PostHog { this.webVitalsAutocapture?.onRemoteConfig(config) this.exceptionObserver?.onRemoteConfig(config) this.deadClicksAutocapture?.onRemoteConfig(config) - - if (config.hasFeatureFlags !== false) { - // Check explicitly for false - anything else means we there could be so lets load them - } } _loaded(): void { diff --git a/src/site-apps.ts b/src/site-apps.ts index 9206f8475..63586b0d3 100644 --- a/src/site-apps.ts +++ b/src/site-apps.ts @@ -75,18 +75,6 @@ export class SiteApps { } onRemoteConfig(response?: RemoteConfig): void { - if (assignableWindow._POSTHOG_SITE_APPS) { - // Loaded via new config so we have the apps preloaded - if (this.instance.config.opt_in_site_apps) { - assignableWindow._POSTHOG_SITE_APPS.forEach((app) => { - app.load(this.instance) - }) - } - this.loaded = true - - return - } - if (isArray(response?.siteApps) && response.siteApps.length > 0) { if (this.enabled && this.instance.config.opt_in_site_apps) { const checkIfAllLoaded = () => {