Make .decode(a, {stream :true}) slightly faster in TextDecoder

This commit is contained in:
Jarred Sumner
2024-03-22 00:30:50 -07:00
parent 2d61c865fc
commit 7276ff9935

View File

@@ -599,7 +599,7 @@ pub const TextDecoder = struct {
};
if (arguments.len > 1 and arguments[1].isObject()) {
if (arguments[1].get(globalThis, "stream")) |stream| {
if (arguments[1].fastGet(globalThis, .stream)) |stream| {
if (stream.coerce(bool, globalThis)) {
return this.decodeSlice(globalThis, array_buffer.slice(), true);
}