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

Avoid accessing vsWorker of undefined / null value #46012

Merged
merged 1 commit into from Mar 26, 2018

Conversation

Projects
None yet
2 participants
@jjyyxx
Copy link
Contributor

jjyyxx commented Mar 17, 2018

According to Microsoft/monaco-editor#766, I made small changes to the code. The message might be null if serializedMessage === 'null' or undefined if the JSON.parse throws a SyntaxError. So the code should check the nullity first.

Monaco editor itself, I think, will not make invalid messages like this. But other message source(like webpack) which is not intended for monaco editor may lead to this error.

@alexandrudima

This comment has been minimized.

Copy link
Member

alexandrudima commented Mar 26, 2018

Thank you!

@alexandrudima alexandrudima added this to the March 2018 milestone Mar 26, 2018

@alexandrudima alexandrudima merged commit 86b094d into Microsoft:master Mar 26, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment