-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,12 +97,24 @@ export class TopologyObject implements ITopologyObject { | |
this._notify("callFn", [serializedVertex]); | ||
} | ||
|
||
merge(vertices: Vertex[]) { | ||
async merge( | ||
vertices: Vertex[], | ||
synchronizeVertices: (croId: string, nodeId: string) => void, | ||
) { | ||
for (const vertex of vertices) { | ||
// Check to avoid manually crafted `undefined` operations | ||
if (!vertex.operation) { | ||
continue; | ||
} | ||
if ( | ||
this.hashGraph.checkVertexDependency( | ||
vertex.operation, | ||
vertex.dependencies, | ||
vertex.nodeId, | ||
) | ||
) { | ||
await synchronizeVertices(this.id, vertex.nodeId); | ||
Check failure on line 116 in packages/object/src/index.ts
|
||
} | ||
|
||
this.hashGraph.addVertex( | ||
vertex.operation, | ||
|