-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app): Allow portal to re-check for root element (#2440)
If the portal modal was used during the first render (e.g. for the analytics opt-in modal), the modal root would not be present in the DOM (since the root itself is created by the App component), causing the modal to not appear. This change allows the Portal component to: - Cache the root instead of getting it from the document on every render - Retry getting the root after mounting, when we're (pretty) sure the root is also actually mounted in the DOM
- Loading branch information
Showing
2 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters