Version
2.9.87
Context
Funnel builder — saving a sequence that contains a conditional node (funnel_condition) followed by a "Wait for tag" node on one of its branches.
Description
stripSequenceSets in start.js iterates recursively over funnel sequence nodes. When it encounters a node with action_name === "funnel_condition", it unconditionally accesses t.children.no and t.children.yes without checking whether t.children is defined:
stripSequenceSets: function(t) {
var e = this;
return this.each(t, function(t) {
"send_custom_email" == t.action_name
? t = e.stripEmailSequence(t)
: "funnel_condition" == t.action_name && (
t.children.no = e.stripSequenceSets(t.children.no),
t.children.yes = e.stripSequenceSets(t.children.yes)
)
}), t
}
Nodes that are not send_custom_email or funnel_condition but appear nested inside a conditional branch (e.g. wait_for_tag) can have children as undefined in their serialized structure. The recursive call passes these nodes back into stripSequenceSets, which on the next iteration attempts to access .no on an undefined children property.
Error
TypeError: can't access property "no", t.children is undefined
stripSequenceSets start.js:2
Steps to Reproduce
- Create a funnel with a
funnel_condition node.
- On either the Yes or No branch, add a Wait for tag action.
- Click Save.
Expected Behavior
The funnel saves without errors.
Actual Behavior
TypeError is thrown in stripSequenceSets and the save fails.
Workaround
Adding a guard on t.children before accessing its properties resolves the issue:
"funnel_condition" == t.action_name && t.children && (
t.children.no = e.stripSequenceSets(t.children.no),
t.children.yes = e.stripSequenceSets(t.children.yes)
)
Version
2.9.87
Context
Funnel builder — saving a sequence that contains a conditional node (
funnel_condition) followed by a "Wait for tag" node on one of its branches.Description
stripSequenceSetsinstart.jsiterates recursively over funnel sequence nodes. When it encounters a node withaction_name === "funnel_condition", it unconditionally accessest.children.noandt.children.yeswithout checking whethert.childrenis defined:Nodes that are not
send_custom_emailorfunnel_conditionbut appear nested inside a conditional branch (e.g.wait_for_tag) can havechildrenasundefinedin their serialized structure. The recursive call passes these nodes back intostripSequenceSets, which on the next iteration attempts to access.noon an undefinedchildrenproperty.Error
Steps to Reproduce
funnel_conditionnode.Expected Behavior
The funnel saves without errors.
Actual Behavior
TypeErroris thrown instripSequenceSetsand the save fails.Workaround
Adding a guard on
t.childrenbefore accessing its properties resolves the issue: