Don't call posthog before its initialised
This commit is contained in:
@@ -343,7 +343,8 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||
window.matrixclient = client;
|
||||
window.isPasswordlessUser = isPasswordlessUser;
|
||||
|
||||
PosthogAnalytics.instance.onLoginStatusChanged();
|
||||
if (PosthogAnalytics.hasInstance())
|
||||
PosthogAnalytics.instance.onLoginStatusChanged();
|
||||
}, [client, isPasswordlessUser]);
|
||||
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user