Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make sure DOM has loaded before accessing #612

Conversation

osandell
Copy link

Modularity is working great out of the box. However I noticed that when adding a custom plugin I caused the DOM to load slightly slower. This causes the modal.ts of Modularity to try to access it before loaded which causes a crash.

This might only be an issue on our end (Whitespace) due to our custom plugins. However I thought I'd make a PR since I don't think this change would have any negative side effect.

What it does is to add a DOMContentLoaded event listener to make sure the DOM is available before access attempt in the constructor.

@osandell osandell force-pushed the feature/improved-modal-stability branch from 0bfef61 to 0303e8d Compare March 22, 2024 20:03
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants