diff --git a/packages/editor-ui/src/views/NodeView.v2.vue b/packages/editor-ui/src/views/NodeView.v2.vue index 7611483d27..03d7fb6de0 100644 --- a/packages/editor-ui/src/views/NodeView.v2.vue +++ b/packages/editor-ui/src/views/NodeView.v2.vue @@ -1628,10 +1628,16 @@ const getAllNodesCommands = computed(() => { return editableWorkflow.value.nodes.map((node) => { const { id, name } = node; + const nodeType = nodeTypesStore.getNodeType(node.type, node.typeVersion); + + const src = getIconSource(nodeType); return { id, title: `Open "${name}" Node`, parent: 'Open node', + icon: src?.path + ? `` + : '', handler: () => { setNodeActive(id); }, @@ -1639,7 +1645,9 @@ const getAllNodesCommands = computed(() => { }); }); -function getIconSource(nodeType: SimplifiedNodeType) { +function getIconSource(nodeType: SimplifiedNodeType | null) { + if (!nodeType) return {}; + const baseUrl = rootStore.baseUrl; const iconUrl = getNodeIconUrl(nodeType, uiStore.appliedTheme); @@ -1676,7 +1684,9 @@ const addNodeCommand = computed(() => { return { id: name, title: `Add ${displayName} Node`, - icon: ``, + icon: src?.path + ? `` + : '', parent: 'Add node', handler: async () => { await addNodes([{ type: name }]);