Skip to content

Commit a32dd9c

Browse files
committed
Protect against {}
1 parent adc4bb5 commit a32dd9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl Config {
178178
pub fn update(&mut self, json: serde_json::Value) {
179179
log::info!("Config::update({:#})", json);
180180

181-
if json.is_null() {
181+
if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) {
182182
return;
183183
}
184184

0 commit comments

Comments
 (0)