Skip to content

Commit 9df4c62

Browse files
authored
Merge pull request #10176 from gitbutlerapp/posthog-idempotent-init
Make PostHog init method idempotent
2 parents b60d2ef + 922ca03 commit 9df4c62

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/desktop/src/lib/analytics/posthog.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class PostHogWrapper {
3737
}
3838

3939
async init() {
40+
if (this._instance) return;
4041
const appInfo = await this.backend.getAppInfo();
4142
this._instance = posthog.init(PUBLIC_POSTHOG_API_KEY, {
4243
api_host: 'https://eu.posthog.com',

0 commit comments

Comments
 (0)