Page MenuHomePhabricator

[landing] Add `openConnectModal` truthiness check before calling function
ClosedPublic

Authored by atul on Dec 24 2022, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 5:59 PM
Unknown Object (File)
Sun, Nov 10, 5:55 PM
Unknown Object (File)
Tue, Nov 5, 4:19 AM
Unknown Object (File)
Tue, Nov 5, 4:19 AM
Unknown Object (File)
Tue, Nov 5, 4:16 AM
Unknown Object (File)
Tue, Nov 5, 4:16 AM
Unknown Object (File)
Sat, Nov 2, 3:32 AM
Unknown Object (File)
Sat, Nov 2, 3:32 AM
Subscribers
None

Details

Summary

Still encountering the issue described here: https://linear.app/comm/issue/ENG-2539/encountering-openconnectmodal-is-not-a-function-when-attempting-to

Modifying it to:

3ebbf5.png (216×710 px, 36 KB)

got things working again, but not sure if this is a solid solution.

Don't want to get sidetracked by this issue at the moment so haven't really investigated, just wanted to get things back in a working state.


Depends on D6026

Test Plan

The error modal no longer appears.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 24 2022, 8:11 PM
Harbormaster failed remote builds in B14737: Diff 20101!
atul requested review of this revision.Dec 24 2022, 8:22 PM
ashoat added inline comments.
landing/siwe.react.js
96–98

Nit, I prefer either of these:

if (hasNonce && openConnectModal) {
  openConnectModal();
}
if (hasNonce) {
  openConnectModal?.();
}
This revision is now accepted and ready to land.Dec 25 2022, 2:40 PM

rebase (before addressing feedback)

rebase before landing (after addressing feedback)

This revision was landed with ongoing or failed builds.Dec 25 2022, 3:47 PM
This revision was automatically updated to reflect the committed changes.