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)
Tue, Jul 2, 1:10 AM
Unknown Object (File)
Mon, Jul 1, 10:50 PM
Unknown Object (File)
Sun, Jun 30, 12:14 PM
Unknown Object (File)
Sat, Jun 29, 12:15 PM
Unknown Object (File)
Wed, Jun 19, 8:05 PM
Unknown Object (File)
Tue, Jun 18, 1:12 AM
Unknown Object (File)
Mon, Jun 17, 5:23 AM
Unknown Object (File)
Mon, Jun 17, 12:19 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
Lint Not Applicable
Unit
Tests Not Applicable

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

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.