Skip to content

Commit

Permalink
fix(core/GrahicsFactory): account for removed shapes on updateContain…
Browse files Browse the repository at this point in the history
…ments

Related to bpmn-io/bpmn-js#2269
  • Loading branch information
jarekdanielak committed Jan 9, 2025
1 parent 89f79d5 commit 7465a5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/core/GraphicsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ GraphicsFactory.prototype.updateContainments = function(elements) {
forEach(children.slice().reverse(), function(child) {
var childGfx = elementRegistry.getGraphics(child);

// shape was removed
if (!childGfx) {
return;

Check warning on line 197 in lib/core/GraphicsFactory.js

View check run for this annotation

Codecov / codecov/patch

lib/core/GraphicsFactory.js#L197

Added line #L197 was not covered by tests
}

prependTo(childGfx.parentNode, childrenGfx);
});
});
Expand Down

0 comments on commit 7465a5e

Please sign in to comment.