fix: remove potential panic on initialize result serialization in nvim-core

This commit is contained in:
Riz Ashraf committed 2026-09-22 06:16:06 +01:00
1 parent b2f15de58c
commit 1e39122e05
1 file changed
+1 -1
+1 -1
View File
@@ -610,7 +610,7 @@ pub async fn run_mcp_loop(app_name: &str, app_version: &str) {
send_response(JsonRpcResponse { send_response(JsonRpcResponse {
jsonrpc: "2.0".to_string(), jsonrpc: "2.0".to_string(),
id, id,
result: Some(serde_json::to_value(init).unwrap()), result: Some(serde_json::to_value(init).unwrap_or_default()),
error: None, error: None,
}) })
.await; .await;