Skip to content

Commit e4cffd0

Browse files
Simon-Lauxlink2xt
authored andcommitted
move delete function up
1 parent c93d363 commit e4cffd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescript/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export abstract class BaseTransport<T = {}>
3838
if (!response.id) return; // TODO: Handle error.
3939
const handler = this._requests.get(response.id);
4040
if (!handler) return; // TODO: Handle error.
41+
this._requests.delete(response.id)
4142
if (response.error) handler.reject(response.error);
4243
else handler.resolve(response.result);
43-
this._requests.delete(response.id)
4444
}
4545

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

0 commit comments

Comments
 (0)