1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

refactor(ext/node): remove conditional in ServerResponse#enqueue (#18617)

It's superfluous, the issue linked is no longer relevant.

Closes https://github.com/denoland/deno/issues/18579
This commit is contained in:
Bartek Iwańczuk 2023-04-07 06:10:05 +02:00 committed by GitHub
parent 5c7f76c570
commit 5d9172467e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -409,11 +409,6 @@ export class ServerResponse extends NodeWritable {
#reqEvent?: Deno.RequestEvent;
static #enqueue(controller: ReadableStreamDefaultController, chunk: Chunk) {
// TODO(kt3k): This is a workaround for denoland/deno#17194
// This if-block should be removed when the above issue is resolved.
if (chunk.length === 0) {
return;
}
if (typeof chunk === "string") {
controller.enqueue(ENCODER.encode(chunk));
} else {