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 None position values in publishDiagnostics message #753

Merged
merged 1 commit into from Sep 17, 2019

Conversation

@rchl
Copy link
Contributor

commented Sep 12, 2019

For some issues eslint triggers error with no endLine and/or
endColumn defined. In that case the code should use line and
column for the values, respectively. While the code has attempted to
do that, it only checked for null value for those while eslint
actually doesn't even have them set so they are undefined.

Fix by checking that value is either null or undefined.

This problem causes random exceptions on some LSP clients (for me it
triggered in Sublime LSP). Not sure if it affected Vetur.

Resolves #752

For some issues eslint triggers error with no `endLine` and/or
`endColumn` defined. In that case the code should use `line` and
`column` for the values, respectively. While the code has attempted to
do that, it only checked for `null` value for those while eslint
actually doesn't even have them set so they are undefined.

Fix by checking that value is either null or undefined.

This problem causes random exceptions on some LSP clients (for me it
triggered in Sublime LSP). Not sure if it affected Vetur.

Resolves #752
@dbaeumer

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

Thanks!

@dbaeumer dbaeumer merged commit 3ea0bb0 into microsoft:master Sep 17, 2019
2 checks passed
2 checks passed
Microsoft.vscode-eslint Build #20190912.1 succeeded
Details
license/cla All CLA requirements met.
@rchl rchl deleted the rchl:fix/none-line-and-character branch Sep 17, 2019
@dbaeumer dbaeumer added this to the 1.9.2 milestone Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.