Fix 'WorkspaceConfiguration' request with empty configuration section strings
This commit is contained in:
parent
71551d395b
commit
7d4f7eb4bd
1 changed files with 5 additions and 2 deletions
|
@ -1058,8 +1058,11 @@ impl Application {
|
||||||
.filter_map(|item| {
|
.filter_map(|item| {
|
||||||
let mut config = language_server.config()?;
|
let mut config = language_server.config()?;
|
||||||
if let Some(section) = item.section.as_ref() {
|
if let Some(section) = item.section.as_ref() {
|
||||||
for part in section.split('.') {
|
// for some reason some lsps send an empty string (observed in 'vscode-eslint-language-server')
|
||||||
config = config.get(part)?;
|
if !section.is_empty() {
|
||||||
|
for part in section.split('.') {
|
||||||
|
config = config.get(part)?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(config)
|
Some(config)
|
||||||
|
|
Loading…
Reference in a new issue