fix: Ensure _meta object is not lost when onprogress option is passed
When the onprogress option is passed, the _meta object in the request params was being overwritten, causing any existing _meta content to be lost.
This commit is contained in:
parent
df0d9c4ffc
commit
49777d5652
1 changed files with 4 additions and 1 deletions
|
|
@ -541,7 +541,10 @@ export abstract class Protocol<
|
|||
this._progressHandlers.set(messageId, options.onprogress);
|
||||
jsonrpcRequest.params = {
|
||||
...request.params,
|
||||
_meta: { progressToken: messageId },
|
||||
_meta: {
|
||||
...(request.params._meta || {}),
|
||||
progressToken: messageId
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue