fix(editor): Fix unique names for node duplication (#6134)
* 🐛 Fix unique names for node duplication * 🐛 Fix i18n references
This commit is contained in:
@@ -204,6 +204,12 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
allNodes(): INodeUi[] {
|
||||
return this.workflow.nodes;
|
||||
},
|
||||
/**
|
||||
* Names of all nodes currently on canvas.
|
||||
*/
|
||||
canvasNames(): Set<string> {
|
||||
return new Set(this.allNodes.map((n) => n.name));
|
||||
},
|
||||
nodesByName(): { [name: string]: INodeUi } {
|
||||
return this.workflow.nodes.reduce((accu: { [name: string]: INodeUi }, node) => {
|
||||
accu[node.name] = node;
|
||||
|
||||
Reference in New Issue
Block a user