diff --git a/src/runtime/renderer.ts b/src/runtime/renderer.ts index 0f47bce248..118f2a59d3 100644 --- a/src/runtime/renderer.ts +++ b/src/runtime/renderer.ts @@ -6,6 +6,7 @@ import { setResponseHeader, setResponseHeaders, setResponseStatus, + isStream } from "h3"; import { useNitroApp } from "./app"; @@ -58,7 +59,7 @@ export function defineRenderHandler(handler: RenderHandler) { } // Send response body - return typeof response.body === "string" + return typeof response.body === "string" || isStream(response.body) ? response.body : JSON.stringify(response.body); });