diff options
Diffstat (limited to 'ext/http/00_serve.js')
-rw-r--r-- | ext/http/00_serve.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js index 26632c2ba..131f056a7 100644 --- a/ext/http/00_serve.js +++ b/ext/http/00_serve.js @@ -44,8 +44,8 @@ const { PromisePrototypeThen, Symbol, TypeError, + TypedArrayPrototypeGetSymbolToStringTag, Uint8Array, - Uint8ArrayPrototype, } = primordials; const { @@ -397,7 +397,7 @@ function fastSyncResponseOrStream(req, respBody, status, innerRequest) { const stream = respBody.streamOrStatic; const body = stream.body; - if (ObjectPrototypeIsPrototypeOf(Uint8ArrayPrototype, body)) { + if (TypedArrayPrototypeGetSymbolToStringTag(body) === "Uint8Array") { innerRequest?.close(); op_http_set_response_body_bytes(req, body, status); return; |