Skip to content

Commit

Permalink
another attempt at fixing workflow bugs (#4486)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwdchang authored Aug 16, 2024
1 parent 5a13a19 commit d0b3d77
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/client/hmi-client/src/services/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,25 @@ export class WorkflowWrapper {
const updated = updatedNodeMap.get(nodeId);
if (updated) {
if ((updated.version as number) > (nodes[i].version as number)) {
nodes[i] = Object.assign(nodes[i], updated);
nodes[i].version = updated.version;
nodes[i].isDeleted = updated.isDeleted;
nodes[i].status = updated.status;
nodes[i].x = updated.x;
nodes[i].y = updated.y;
nodes[i].width = updated.width;
nodes[i].height = updated.height;
nodes[i].active = updated.active;

if (!_.isEqual(nodes[i].inputs, updated.inputs)) {
nodes[i].inputs = updated.inputs;
}
if (!_.isEqual(nodes[i].outputs, updated.outputs)) {
nodes[i].outputs = updated.outputs;
}
if (!_.isEqual(nodes[i].state, updated.state)) {
nodes[i].state = updated.state;
}
// nodes[i] = Object.assign(nodes[i], updated);
}
updatedNodeMap.delete(nodeId);
}
Expand Down

0 comments on commit d0b3d77

Please sign in to comment.