Skip to content

Commit

Permalink
fix: refactor recently added Vue.set directive
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgrozav committed Jun 12, 2023
1 parent bc78658 commit aac8176
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/editor-ui/src/stores/ndv.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,19 @@ export const useNDVStore = defineStore(STORES.NDV, {
}
},
updateNodeParameterIssues(issues: INodeIssues): void {
const activeNode = this.activeNode;
const workflowsStore = useWorkflowsStore();
const activeNode = workflowsStore.getNodeByName(this.activeNodeName || '');

if (activeNode) {
Vue.set(activeNode, 'issues', {
...activeNode.issues,
...issues,
const nodeIndex = workflowsStore.workflow.nodes.findIndex((node) => {
return node.name === activeNode.name;
});

workflowsStore.updateNodeAtIndex(nodeIndex, {
issues: {
...activeNode.issues,
...issues,
},
});
}
},
Expand Down

0 comments on commit aac8176

Please sign in to comment.