Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Commit e5a2719

Browse files
committed
Add early return if JSON RPC request is not found
1 parent c1e0526 commit e5a2719

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/createStreamMiddleware.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export default function createStreamMiddleware(options: Options = {}) {
104104
const context = idMap[res.id as unknown as string];
105105
if (!context) {
106106
console.warn(`StreamMiddleware - Unknown response id "${res.id}"`);
107+
return;
107108
}
108109

109110
delete idMap[res.id as unknown as string];

0 commit comments

Comments
 (0)