Use .instance pattern
This commit is contained in:
parent
07eaee25d2
commit
a1ffd240e1
6 changed files with 14 additions and 19 deletions
|
@ -149,7 +149,7 @@ export class PosthogAnalytics {
|
|||
private static _instance = null;
|
||||
private platformSuperProperties = {};
|
||||
|
||||
public static instance(): PosthogAnalytics {
|
||||
public static get instance(): PosthogAnalytics {
|
||||
if (!this._instance) {
|
||||
this._instance = new PosthogAnalytics(posthog);
|
||||
}
|
||||
|
@ -362,7 +362,3 @@ export class PosthogAnalytics {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getAnalytics(): PosthogAnalytics {
|
||||
return PosthogAnalytics.instance();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue