Skip to content

Commit

Permalink
move delete function up
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Laux authored and link2xt committed Jul 6, 2024
1 parent c93d363 commit e4cffd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typescript/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export abstract class BaseTransport<T = {}>
if (!response.id) return; // TODO: Handle error.
const handler = this._requests.get(response.id);
if (!handler) return; // TODO: Handle error.
this._requests.delete(response.id)
if (response.error) handler.reject(response.error);
else handler.resolve(response.result);
this._requests.delete(response.id)
}

notification(method: string, params?: Params): void {
Expand Down

0 comments on commit e4cffd0

Please sign in to comment.