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 error when the notes plugin receives a non-string message #3588

Merged
merged 1 commit into from Mar 15, 2024

Conversation

NatKarmios
Copy link
Contributor

It seems the React dev tools also trigger 'message' events, which pollutes the console with errors (about 2-3 every second).

image

This is especially problematic when developing a presentation with react-scripts start, as each error causes a full overlay on the speaker view.

image

The error is caused by the attempt to JSON-parse the event body, and is fixed with a try/catch in onPostMessage().

@hakimel hakimel merged commit d4e5c39 into hakimel:master Mar 15, 2024
@hakimel
Copy link
Owner

hakimel commented Mar 15, 2024

Thanks for fixing!

@NatKarmios NatKarmios deleted the notes-error-catch branch March 15, 2024 18:55
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.

None yet

2 participants