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
F3368965: D9047.diff
Mon, Nov 25, 9:18 PM
Unknown Object (File)
Fri, Nov 22, 4:15 PM
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
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #30650)

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)