Given the following code, we get lots of inconsistent behavior:
diagram.model.addNodeData(data)
const node = diagram.findNodeForData(data)
// then we edit the node and also set some fields if the node is within the virtualized viewport
The problem is, the node
variable is often null
, sometimes it is not null.
How do we make this more reliable so that node is never null in this case.