Skip to content

Commit 100edd4

Browse files
committed
Fixed bug where the 'choice' process incorrectly sent a 'merge' signal when no branches were activated
1 parent 3b7755f commit 100edd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine2/ProcChoiceFSM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ var ChoiceLogic = function() {
132132
}
133133
// if there exists "merge" output, emit the 'merge' control signal first.
134134
// see 'join' process for explanation
135-
if (proc.ctrOuts.merge) {
135+
if (proc.ctrOuts.merge && outValues.length) { // (don't send the signal if no branches are activated)
136136
var Nj = outValues.length, Nb = Nj;
137137
proc.engine.emitSignals([{"_id": proc.ctrOuts.merge, "data": [{"Nb": Nb, "Nj": Nj}]}],
138138
function(err) { });

0 commit comments

Comments
 (0)