diff --git a/src/RequestManager.ts b/src/RequestManager.ts index d51aa44..978a042 100644 --- a/src/RequestManager.ts +++ b/src/RequestManager.ts @@ -118,7 +118,7 @@ class RequestManager { results.forEach((response) => { const id = typeof response.id === "string" ? response.id : response.id.toString(); - const promiseForResult = this.requests[response.id]; + const promiseForResult = this.requests[id]; if (promiseForResult === undefined) { throw new Error( `Received an unrecognized response id: ${response.id}. Valid ids are: ${Object.keys(this.requests)}`,