Skip to content

Commit 996206f

Browse files
martskinsautozimu
authored andcommitted
Fix codeAction error where it failed to accept null
1 parent 13729a4 commit 996206f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/language_server_protocol.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,8 @@ impl LanguageClient {
13931393
},
13941394
)?;
13951395

1396-
let response: CodeActionResponse = serde_json::from_value(result.clone())?;
1396+
let response: Option<CodeActionResponse> = serde_json::from_value(result.clone())?;
1397+
let response = response.unwrap_or_else(|| vec![]);
13971398

13981399
// Convert any Commands into CodeActions, so that the remainder of the handling can be
13991400
// shared.

0 commit comments

Comments
 (0)