Reproduced example: https://flow.org/try/#0PTAEAEDMBsHsHcBQAXAngBwKagMrIIbLYC8oA3oqKANTIAWAlgHYDmAzgFygCCATr-lQAeCgEhR1JvgC2mLm2S9mLADSUqGqtQDGsAK5NkXJnukAjTLzWgAvgD5ENgNyJEupgtwBRACoB9ADluAFkvUFIAchxfQJCvCLdYD2RvfwBhAHkAVQCfcNAomMycnwSUDGwcTGQAmRJyUDQsLibMWEhU2NCVUClZeUVlWxdW3Gq0-UN8skaKlor2zuLcnt0DI17TC15h11HubWQGJPyqmrrQAB8x5An1l0RIA0PjplBeTAATPW1LAAoFIQ5LgCEQevgXkkuAcjkkAJRcPBA8jqNjwBjIbR0UB-CGwpgAOlacJRmm0+DYlRiQVCHHUmg+yD0vDeFE0mgJnMBYPp7Poyk4oG5mCJjFYbAJ0nw6D+f35rBJxDspPZVFEjOZrN5mnEnNFymsqqNVD6wLxrwJpu1oHENmtohscOtzlconJlKW2VydNVGpZKtVeuFhtV8vYAyB+vFkulsrDiuVbKN6uqmoD7N1nLDIeN7LWhi45qSBPzyHtDvtjudD00n0wkHwemgRlE1r9b2FLiodpsQA
Having read the documentation and read similar issues, I am unclear how to correctly use disjoint unions in the simple example above.
Is anyone able to point me in the right direction here?
The problem is actually not with the union, but with your map call which invalidates the refinement. Pulling count/name before the call to map works. Here is a working example.
@AugustinLF is correct. Here are the [docs on refinement invalidations].
Here is a [fixed example] of your code.
Thanks @AugustinLF @wchargin
Most helpful comment
The problem is actually not with the union, but with your map call which invalidates the refinement. Pulling count/name before the call to map works. Here is a working example.