Page MenuHomePhabricator

[web] Fix wrong selector used to obtain connection
ClosedPublic

Authored by inka on Aug 31 2023, 6:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 1:25 PM
Unknown Object (File)
Oct 8 2024, 1:26 PM
Unknown Object (File)
Oct 1 2024, 3:00 PM
Unknown Object (File)
Oct 1 2024, 3:00 PM
Unknown Object (File)
Oct 1 2024, 3:00 PM
Unknown Object (File)
Oct 1 2024, 2:59 PM
Unknown Object (File)
Oct 1 2024, 2:58 PM
Unknown Object (File)
Sep 25 2024, 2:28 PM
Subscribers

Details

Summary

issue: https://linear.app/comm/issue/ENG-4826/uncaught-typeerror-cannot-read-properties-of-undefined-reading-status
connection was moved to keyserverStore, so it should be fetched with connectionSelector. This was causing errors
useSelector from 'react-redux' was used instead the one from web/redux/redux-utils.js, so flow check did catch it before

Test Plan

checked that the error disappeared
reloaded the page
logged out and back in
checked other places where we use useSelector from 'react-redux' on lib, web and native to see if I didn't miss anything else

Diff Detail

Repository
rCOMM Comm
Branch
inka/hotfix
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Aug 31 2023, 6:23 AM
tomek added inline comments.
web/push-notif/badge-handler.react.js
14–23

It might be a good idea to mention in this invariant that it's a connection for a keyserver with ashoatKeyserverID. It might be even better to avoid an invariant - how about accessing connection status optionally?

This revision is now accepted and ready to land.Aug 31 2023, 6:29 AM
inka edited the test plan for this revision. (Show Details)
inka edited the test plan for this revision. (Show Details)