Skip to content

Commit 881a0ce

Browse files
Destructured progress and total from notification params object
1 parent 2a3cab2 commit 881a0ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shared/protocol.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export abstract class Protocol<
278278
}
279279

280280
private _onprogress(notification: ProgressNotification): void {
281-
const { progress, total, progressToken } = notification.params;
281+
const { progressToken, ...params } = notification.params;
282282
const handler = this._progressHandlers.get(Number(progressToken));
283283
if (handler === undefined) {
284284
this._onerror(
@@ -289,7 +289,7 @@ export abstract class Protocol<
289289
return;
290290
}
291291

292-
handler({ progress, total });
292+
handler(params);
293293
}
294294

295295
private _onresponse(response: JSONRPCResponse | JSONRPCError): void {

0 commit comments

Comments
 (0)