mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
fix(editor): Check for PostHog before feature flag call (#3928)
* 🐛 Check for PH before feature flag call * 🔥 Remove logging
This commit is contained in:
parent
76f9ad8bae
commit
db02a379d9
|
@ -10,9 +10,38 @@ declare global {
|
|||
interface Window {
|
||||
rudderanalytics: RudderStack;
|
||||
featureFlag: FeatureFlag;
|
||||
posthog: posthog;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Simplified version of:
|
||||
* https://github.com/PostHog/posthog-js/blob/master/src/module.d.ts
|
||||
*/
|
||||
/* tslint:disable-next-line */
|
||||
interface posthog {
|
||||
identify(
|
||||
uniqueId?: string,
|
||||
userPropertiesToSet?: object,
|
||||
userPropertiesToSetOnce?: object,
|
||||
): void;
|
||||
reset(resetDeviceId?: boolean): void;
|
||||
capture(
|
||||
eventName: string,
|
||||
properties?: object,
|
||||
options?: object,
|
||||
): unknown;
|
||||
isFeatureEnabled(key: string, options?: object): boolean;
|
||||
register(properties: object, days?: number): void;
|
||||
people: {
|
||||
set(
|
||||
prop: object | string,
|
||||
to?: object,
|
||||
callback?: Function,
|
||||
): unknown;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IUserNodesPanelSession {
|
||||
sessionId: string;
|
||||
data: IUserNodesPanelSessionData;
|
||||
|
|
|
@ -2051,7 +2051,7 @@ export default mixins(
|
|||
|
||||
this.setZoomLevel(1);
|
||||
|
||||
if (window.featureFlag && !window.featureFlag.isEnabled('show-welcome-note')) return;
|
||||
if (window.posthog && !window.featureFlag.isEnabled('show-welcome-note')) return;
|
||||
|
||||
setTimeout(() => {
|
||||
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [0, 0]});
|
||||
|
|
Loading…
Reference in a new issue