always flush

This commit is contained in:
Ciro Spaciari
2024-09-06 16:42:42 -07:00
parent 4eb9f4aac4
commit 111e320e56

View File

@@ -1262,7 +1262,10 @@ function flushFirstWrite(self) {
type: "direct",
pull: controller => {
self[controllerSymbol] = controller;
if (firstWrite) controller.write(firstWrite);
if (firstWrite) {
controller.write(firstWrite);
controller.flush(); // flush the first write
}
firstWrite = undefined;
if (!self[finishedSymbol]) {
const { promise, resolve } = $newPromiseCapability(GlobalPromise);