Skip to content

Commit

Permalink
[FIX] Manage adding overlays referencing an unknown bpmn element (#46)
Browse files Browse the repository at this point in the history
Previously, this generated an error preventing adding the rest of the overlays present in the array.
  • Loading branch information
tbouffard authored Sep 2, 2021
1 parent fe006ae commit a796864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/htmlwidgets/bpmnVisualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ HTMLWidgets.widget({
x.overlays && x.overlays.map(overlay => {
const elementsByIds = bpmnVisualization.bpmnElementsRegistry.getElementsByIds(overlay.elementId);

if (elementsByIds) {
if (elementsByIds.length) {
const overlayConfig = elementsByIds[0].bpmnSemantic.isShape ? {
position: 'top-center',
label: overlay.label,
Expand Down

0 comments on commit a796864

Please sign in to comment.