From 7b18fa0acd376cc6ec4fe7a15e1caf86d52eff9e Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 1 Aug 2023 13:18:17 +0200 Subject: [PATCH] fix(app): handle directly `node.res.end()` returned value --- src/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.ts b/src/app.ts index 420cadab..636d4b2a 100644 --- a/src/app.ts +++ b/src/app.ts @@ -212,6 +212,11 @@ function handleHandlerResponse(event: H3Event, val: any, jsonSpace?: number) { if (val instanceof Error) { throw createError(val); } + + // Node.js Server Response (already handled with res.end()) + if (typeof val.end === "function") { + return true; + } } const valType = typeof val;