fix: getDiagnostics breaking changes (#307)
This commit is contained in:
parent
87d54d8a2b
commit
0e5132f041
3 changed files with 7 additions and 6 deletions
|
@ -685,7 +685,7 @@
|
|||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/node": "^10.12.0",
|
||||
"coc.nvim": "^0.0.81-next.5",
|
||||
"coc.nvim": "^0.0.81-next.6",
|
||||
"esbuild": "^0.8.29",
|
||||
"semver": "^7.3.2",
|
||||
"vscode-languageserver-protocol": "^3.16.0",
|
||||
|
|
|
@ -110,7 +110,8 @@ export class AutoFixCommand implements Command {
|
|||
return
|
||||
}
|
||||
let file = client.serviceClient.toPath(document.uri)
|
||||
let diagnostics = diagnosticManager.getDiagnostics(document.uri).slice() as Diagnostic[]
|
||||
let collectionDiags = diagnosticManager.getDiagnostics(document.uri)
|
||||
let diagnostics = Array.isArray(collectionDiags) ? collectionDiags as Diagnostic[] : collectionDiags[this.service.id]
|
||||
let missingDiagnostics = diagnostics.filter(o => o.code == 2307)
|
||||
if (missingDiagnostics.length) {
|
||||
let names = missingDiagnostics.map(o => {
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40"
|
||||
integrity sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==
|
||||
|
||||
coc.nvim@^0.0.81-next.5:
|
||||
version "0.0.81-next.5"
|
||||
resolved "https://registry.yarnpkg.com/coc.nvim/-/coc.nvim-0.0.81-next.5.tgz#b09bda5a2d527f7cd7bd786d4dee958160285e2b"
|
||||
integrity sha512-NUTEWmjm9uKGBD8FNsj55PH1Xn4hD5uDCs7EdMoBpXWehq6/P1UoDZQfWXQv9HTq4zF/jH3g7KtZtl94VTlW4A==
|
||||
coc.nvim@^0.0.81-next.6:
|
||||
version "0.0.81-next.6"
|
||||
resolved "https://registry.yarnpkg.com/coc.nvim/-/coc.nvim-0.0.81-next.6.tgz#c3ee7079a66702ebb3b06d4c2bf333d9306ec561"
|
||||
integrity sha512-VT+DhygyTIzu9IRrwCUljMzfNfh8TeXqqrvFsBE0E8cUwERgCAIvRbBMEDfqaaI+XFgyuwNRwbX5kEvfjG/u3g==
|
||||
|
||||
esbuild@^0.8.29:
|
||||
version "0.8.29"
|
||||
|
|
Loading…
Reference in a new issue