Skip to content

Commit

Permalink
fix(app): handle directly node.res.end() returned value
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 1, 2023
1 parent d4f5440 commit 7b18fa0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b18fa0

Please sign in to comment.