diff --git a/lib/handler/attachersHandler.js b/lib/handler/attachersHandler.js index 12b2548..5fab273 100644 --- a/lib/handler/attachersHandler.js +++ b/lib/handler/attachersHandler.js @@ -12,7 +12,7 @@ export default { const nextElements = []; const attachedOutgoing = (element.attachers || []) - .map(att => att.outgoing.reverse()) + .map(attacher => (attacher.outgoing || []).reverse()) .flat() .map(out => out.targetRef); diff --git a/test/fixtures/no-outgoing-from-task.bpmn b/test/fixtures/no-outgoing-from-task.bpmn new file mode 100644 index 0000000..60cb4e8 --- /dev/null +++ b/test/fixtures/no-outgoing-from-task.bpmn @@ -0,0 +1,55 @@ + + + + + Flow_1 + + + + Flow_1 + Flow_2 + + + + Flow_2 + Flow_6 + + Flow_3 + + + + Flow_3 + Flow_4 + + + + + Flow_4 + Flow_5 + + + + + + + + + Flow_6 + Flow_7 + Flow_8 + + + + + Flow_7 + Flow_9 + + + + Flow_9 + + + Flow_8 + + + \ No newline at end of file