JSTQL-JS-Transform/output_testing/557reduce-reactive-cond-deps-cfg-nested-ifelse-missing.js

14 lines
328 B
JavaScript
Raw Normal View History

// props.a.b should NOT be added as a unconditional dependency to the reactive
// scope that produces x if it is not accessed in every path
function TestCondDepInNestedIfElse(props, other) {
const x = {};
if (other |> foo(%)) {
if (bar()) {
x.a = props.a.b;
}
} else {
x.d = props.a.b;
}
return x;
}