From 59e368f9bb223d21015d1c4539c63301093ca092 Mon Sep 17 00:00:00 2001 From: "arvid.nicolaas" Date: Thu, 2 Jun 2022 09:13:36 +0200 Subject: [PATCH] fix(stream): add await inside async try catch block --- deno_dist/stream/async-custom/async-stream-custom.ts | 2 +- packages/stream/src/async-custom/async-stream-custom.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno_dist/stream/async-custom/async-stream-custom.ts b/deno_dist/stream/async-custom/async-stream-custom.ts index d6f3ac444..b07b3bd23 100644 --- a/deno_dist/stream/async-custom/async-stream-custom.ts +++ b/deno_dist/stream/async-custom/async-stream-custom.ts @@ -726,7 +726,7 @@ export abstract class AsyncStreamBase implements AsyncStream { index++; } - return Promise.all( + return await Promise.all( state.map((s: any, i: any): unknown => reducers[i].stateToResult(s)) ); } catch (e) { diff --git a/packages/stream/src/async-custom/async-stream-custom.ts b/packages/stream/src/async-custom/async-stream-custom.ts index 0c9fe00ed..8559289ac 100644 --- a/packages/stream/src/async-custom/async-stream-custom.ts +++ b/packages/stream/src/async-custom/async-stream-custom.ts @@ -726,7 +726,7 @@ export abstract class AsyncStreamBase implements AsyncStream { index++; } - return Promise.all( + return await Promise.all( state.map((s: any, i: any): unknown => reducers[i].stateToResult(s)) ); } catch (e) {