diff --git a/src/domain/javascript/javascriptSymbolicBindings.ts b/src/domain/javascript/javascriptSymbolicBindings.ts index 2f77e90afc..419253ca19 100644 --- a/src/domain/javascript/javascriptSymbolicBindings.ts +++ b/src/domain/javascript/javascriptSymbolicBindings.ts @@ -1399,7 +1399,7 @@ export class JavaScriptSymbolicBindings { appendAll(possible, flow.values.map(guardCurrentPath)); if (!flow.fallsThrough) return { values: possible, fallsThrough: false }; - continuationConditions.push(...(flow.conditions ?? [])); + appendAll(continuationConditions, flow.conditions ?? []); unresolvedFallthrough ||= flow.conditionUnresolved === true; } if (t.isIfStatement(statement)) { @@ -1416,8 +1416,9 @@ export class JavaScriptSymbolicBindings { depth + 1, ), ); - possible.push( - ...flows.flatMap((flow, index) => + appendAll( + possible, + flows.flatMap((flow, index) => flow.values.map((value) => { const guarded = guardCurrentPath(value); return truth === undefined @@ -1432,7 +1433,7 @@ export class JavaScriptSymbolicBindings { if (flows.every((flow) => !flow.fallsThrough)) return { values: possible, fallsThrough: false }; if (truth !== undefined) { - continuationConditions.push(...(flows[0]?.conditions ?? [])); + appendAll(continuationConditions, flows[0]?.conditions ?? []); unresolvedFallthrough ||= flows[0]?.conditionUnresolved === true; } else { const fallthrough = flows.flatMap((flow, index) =>