diff --git a/packages/editor-ui/src/plugins/telemetry/telemetry.types.ts b/packages/editor-ui/src/plugins/telemetry/telemetry.types.ts index 131f45c1791ba..89be705eb2e6e 100644 --- a/packages/editor-ui/src/plugins/telemetry/telemetry.types.ts +++ b/packages/editor-ui/src/plugins/telemetry/telemetry.types.ts @@ -40,6 +40,7 @@ interface posthog { callback?: Function, ): unknown; }; + getFeatureFlag?: (flagName: string) => boolean; } export interface IUserNodesPanelSession { diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 51e8a27dd7b0a..1c578f55d019f 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -2051,7 +2051,12 @@ export default mixins( this.setZoomLevel(1); - if (window.posthog && !window.featureFlag.isEnabled('show-welcome-note')) return; + if ( + window.posthog && window.featureFlag && window.posthog.getFeatureFlag && + !window.featureFlag.isEnabled('show-welcome-note') + ) { + return; + } setTimeout(() => { this.$store.commit('setNodeViewOffsetPosition', {newOffset: [0, 0]});