From d9843044cc1da2656edd70c01cc57ebcee3dedfb Mon Sep 17 00:00:00 2001 From: kpears201 Date: Wed, 4 Sep 2024 09:20:37 -0700 Subject: [PATCH] fix: Void provider methods have JSONRPC errors (#212) --- 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)