Skip to content

Commit

Permalink
fix: Void provider methods have JSONRPC errors (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpears201 authored Sep 4, 2024
1 parent f4cbecd commit d984304
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion languages/javascript/src/shared/ProvideManager/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d984304

Please sign in to comment.