JSTQL-JS-Transform/output_testing/550reduce-reactive-cond-deps-cfg-ifelse.js

13 lines
321 B
JavaScript
Raw Normal View History

// props.a.b should be added as a unconditional dependency to the reactive
// scope that produces x, since it is accessed unconditionally in all cfg
// paths
function TestCondDepInDirectIfElse(props, other) {
const x = {};
if (other |> foo(%)) {
x.b = props.a.b;
} else {
x.c = props.a.b;
}
return x;
}