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)
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
Unknown Object (File)
Nov 10 2024, 5:55 PM
Unknown Object (File)
Nov 5 2024, 4: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.