remove the isString type check into TransformStream write

This commit is contained in:
Pierre Tachoire
2026-03-03 09:40:32 +01:00
parent 252b3c3bf6
commit fcacc8bfc6

View File

@@ -99,11 +99,7 @@ pub fn transformWrite(self: *TransformStream, chunk: js.Value, page: *Page) !voi
try ls.toLocal(transform_fn).call(void, .{ chunk, self._controller });
} else {
// Default transform: pass through
if (chunk.isString()) |str| {
const slice = try str.toSlice();
try self._readable._controller.enqueue(.{ .string = slice });
}
try self._readable._controller.enqueue(.{ .string = try chunk.toStringSlice() });
}
}