diff --git a/src/layouter/state_machine/sm_layouter.ts b/src/layouter/state_machine/sm_layouter.ts index 67c45df..b9b49c5 100644 --- a/src/layouter/state_machine/sm_layouter.ts +++ b/src/layouter/state_machine/sm_layouter.ts @@ -353,6 +353,9 @@ export class SMLayouter { if (n !== node) exitCandidates.add(n); } + const loopGuardPostdom = this.iPostDoms.get(node) + if (loopGuardPostdom && loopGuardPostdom !== node) + exitCandidates.add(loopGuardPostdom); if (exitCandidates.size < 1) { throw new Error('No exit candidates found.');