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

Fix use of useAppState outside preact context #203

Merged

Conversation

DanWebb
Copy link
Member

@DanWebb DanWebb commented Jul 12, 2024

Related issue: https://wrap.sentry.io/issues/5568127635/?alert_rule_id=12711401&alert_type=issue&notification_uuid=20b9d956-1665-4a68-83cf-df8be230b342&project=6237470&referrer=slack

In the stack trace the problem points at "images/map.svg".

I'm guessing it is because locator-map-svg was a shadow dom web component that Safari must initially load outside of Preact context which causes the issue because useAppState() would return undefined if it's not loaded inside the component tree with the AppState.Provider above it.

There's no reason for this to be a shadow dom web component, this is one of the earliest components in the app and I think there was a reason at some point but it got refactored out so its been converted to a plan Preact template + css component instead.

@DanWebb DanWebb self-assigned this Jul 12, 2024
Copy link

sonarcloud bot commented Jul 12, 2024

@mergify mergify bot requested review from Carl-J-M and ella-etch July 12, 2024 10:51
Copy link

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ CSS stylelint 1 0 1.23s
✅ EDITORCONFIG editorconfig-checker 5 0 0.02s
✅ REPOSITORY checkov yes no 20.38s
⚠️ REPOSITORY gitleaks yes 6 2.92s
✅ REPOSITORY git_diff yes no 0.02s
✅ REPOSITORY secretlint yes no 1.89s
✅ REPOSITORY trivy-sbom yes no 2.13s
✅ REPOSITORY trufflehog yes no 34.45s
✅ TSX eslint 4 0 8.67s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@mergify mergify bot merged commit 87fd0e6 into main Jul 12, 2024
7 checks passed
@mergify mergify bot deleted the feature/wrap-776-right-side-of-assignment-cannot-be-destructured branch July 12, 2024 11:37
@DanWebb
Copy link
Member Author

DanWebb commented Jul 12, 2024

🎉 This PR is included in version 1.50.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants