Skip to content

Commit e2689c0

Browse files
authored
fix: use previous site-app variables (#1574)
* fix: use previous site-app variables * test
1 parent d586455 commit e2689c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/__tests__/site-apps.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ describe('SiteApps', () => {
295295

296296
siteAppsInstance.afterDecideResponse(response)
297297

298-
expect(assignableWindow['__$$ph_site_app_1_posthog']).toBe(posthog)
298+
expect(assignableWindow['__$$ph_site_app_1']).toBe(posthog)
299299
expect(typeof assignableWindow['__$$ph_site_app_1_missed_invocations']).toBe('function')
300300
expect(typeof assignableWindow['__$$ph_site_app_1_callback']).toBe('function')
301301
expect(assignableWindow.__PosthogExtensions__?.loadSiteApp).toHaveBeenCalledWith(

src/site-apps.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class SiteApps {
8787
for (const { id, url } of response['siteApps']) {
8888
// TODO: if we have opted out and "type" is "site_destination", ignore it... but do include "site_app" types
8989
this.appsLoading.add(id)
90-
assignableWindow[`__$$ph_site_app_${id}_posthog`] = this.instance
90+
assignableWindow[`__$$ph_site_app_${id}`] = this.instance
9191
assignableWindow[`__$$ph_site_app_${id}_missed_invocations`] = () => this.missedInvocations
9292
assignableWindow[`__$$ph_site_app_${id}_callback`] = () => {
9393
this.appsLoading.delete(id)

0 commit comments

Comments
 (0)