diff --git a/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue b/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue index 9a5eb14dfb..c5a209fec9 100644 --- a/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue +++ b/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue @@ -96,9 +96,17 @@ const importFileRef = ref(); const tagsEventBus = createEventBus(); const sourceControlModalEventBus = createEventBus(); -const nodeViewSwitcher = useLocalStorage('NodeView.switcher', import.meta.env.DEV ? 'true' : ''); +const nodeViewSwitcher = useLocalStorage('NodeView.switcher', ''); const nodeViewVersion = useLocalStorage('NodeView.version', '1'); +const isNodeViewSwitcherEnabled = computed(() => { + return ( + import.meta.env.DEV || + nodeViewSwitcher.value === 'true' || + settingsStore.deploymentType === 'n8n-internal' + ); +}); + const hasChanged = (prev: string[], curr: string[]) => { if (prev.length !== curr.length) { return true; @@ -184,7 +192,7 @@ const workflowMenuItems = computed(() => { disabled: !onWorkflowPage.value || isNewWorkflow.value, }); - if (nodeViewSwitcher.value === 'true') { + if (isNodeViewSwitcherEnabled.value) { actions.push({ id: WORKFLOW_MENU_ACTIONS.SWITCH_NODE_VIEW_VERSION, label: