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
F3580075: D6027.id20101.diff
Sun, Dec 29, 4:49 AM
F3573023: D6027.diff
Sat, Dec 28, 1:45 PM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Nov 24 2024, 2:41 PM
Unknown Object (File)
Nov 10 2024, 5:59 PM
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.