Skip to content

Commit

Permalink
presenceReducer [nfc]: Point to the right Flow bug in two fixmes.
Browse files Browse the repository at this point in the history
These obviously didn't get fixed in the RN v0.63 upgrade, as we'd
thought they would...

It turns out that it's a very similar bug [1] to the one we
originally thought it was [2], but slightly different.
`UserPresence` is an object type with an indexer *and* an additional
property.

[1] facebook/flow#8276
[2] facebook/flow#8178
  • Loading branch information
chrisbobbe committed Jan 21, 2021
1 parent a9d41b8 commit 85b3352
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/presence/presenceReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ export default (state: PresenceState = initialState, action: Action): PresenceSt
...state,
[action.email]: {
...state[action.email],
// $FlowFixMe - Flow bug; should resolve in #4245
// Flow bug (unresolved):
// https://github.com/facebook/flow/issues/8276
// $FlowFixMe
...action.presence,
aggregated: getAggregatedPresence({
...state[action.email],
// $FlowFixMe - Flow bug; should resolve in #4245
// Flow bug (unresolved):
// https://github.com/facebook/flow/issues/8276
// $FlowFixMe
...action.presence,
}),
},
Expand Down

0 comments on commit 85b3352

Please sign in to comment.