Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip msglist render [nfc]: Explicitly note an
undefined
Flow misses.
Kind of puzzling that Flow doesn't complain about this one on its own! As ESLint points out in the rule that we have to disable here, the `= undefined` has no effect on runtime behavior -- it just states explicitly what the code was already doing anyway. But once we do make it explicit, Flow starts noticing that the `undefined` was propagating into boolean expressions and to an argument passed to `isSameRecipient` -- which also justifies a check at the top of that function which by its types had looked dead. Fix that function's signature, and booleanize the value when using as a boolean. This Flow behavior is concerning enough that we should probably just stop saying `let foo;`, and always explicitly initialize to `undefined` when that's what we mean. (The code is potentially a bit clearer that way anyway.) We'll do that next.
- Loading branch information