You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Use readonly shorthand for posthog param
This commit is contained in:
@@ -138,7 +138,6 @@ export class PosthogAnalytics {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private anonymity = Anonymity.Anonymous;
|
private anonymity = Anonymity.Anonymous;
|
||||||
private posthog?: PostHog = null;
|
|
||||||
// set true during the constructor if posthog config is present, otherwise false
|
// set true during the constructor if posthog config is present, otherwise false
|
||||||
private enabled = false;
|
private enabled = false;
|
||||||
private static _instance = null;
|
private static _instance = null;
|
||||||
@@ -151,8 +150,7 @@ export class PosthogAnalytics {
|
|||||||
return this._instance;
|
return this._instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(posthog: PostHog) {
|
constructor(private readonly posthog: PostHog) {
|
||||||
this.posthog = posthog;
|
|
||||||
const posthogConfig = SdkConfig.get()["posthog"];
|
const posthogConfig = SdkConfig.get()["posthog"];
|
||||||
if (posthogConfig) {
|
if (posthogConfig) {
|
||||||
this.posthog.init(posthogConfig.projectApiKey, {
|
this.posthog.init(posthogConfig.projectApiKey, {
|
||||||
|
|||||||
Reference in New Issue
Block a user