From 366b6743c5de5107efbbbf15f4dc7101ff18146e Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Tue, 3 Sep 2024 15:09:45 -0700 Subject: [PATCH] fix: Void provider methods have JSONRPC errors --- languages/javascript/src/shared/ProvideManager/index.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/languages/javascript/src/shared/ProvideManager/index.mjs b/languages/javascript/src/shared/ProvideManager/index.mjs index 68ce6e9c..5da44cfa 100644 --- a/languages/javascript/src/shared/ProvideManager/index.mjs +++ b/languages/javascript/src/shared/ProvideManager/index.mjs @@ -115,7 +115,8 @@ const provide = function(capability, provider) { result.then(result => { if (imethod.response) { - response.result = result + // void results should be null in the JSONRPC message + response.result = result == null ? null : result } Transport.send(module, `${method}Response`, response)