Closed andrebsguedes closed 3 years ago
@andrebsguedes Thanks for finding this issue and providing a PR. I think ??
might be more idiomatic than the undefined
check?
@leezen Sorry, I wasn't sure if your target supported these somewhat newer operators
@andrebsguedes Yup, that makes sense to be cautious. We already have a dependency on this in other parts of our codegen, so this is safe to target support for these.
In JavaScript (or TypeScript) zero is considered a falsy value, so when replicas is assigned to
args.replicas || 1
the0
value is never allowed.