mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00: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:
@@ -10,9 +10,38 @@ declare global {
|
|||||||
interface Window {
|
interface Window {
|
||||||
rudderanalytics: RudderStack;
|
rudderanalytics: RudderStack;
|
||||||
featureFlag: FeatureFlag;
|
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 {
|
export interface IUserNodesPanelSession {
|
||||||
sessionId: string;
|
sessionId: string;
|
||||||
data: IUserNodesPanelSessionData;
|
data: IUserNodesPanelSessionData;
|
||||||
|
|||||||
@@ -2051,7 +2051,7 @@ export default mixins(
|
|||||||
|
|
||||||
this.setZoomLevel(1);
|
this.setZoomLevel(1);
|
||||||
|
|
||||||
if (window.featureFlag && !window.featureFlag.isEnabled('show-welcome-note')) return;
|
if (window.posthog && !window.featureFlag.isEnabled('show-welcome-note')) return;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [0, 0]});
|
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [0, 0]});
|
||||||
|
|||||||
Reference in New Issue
Block a user