LibWeb: Port TypeError in UnderlyingSource from ByteString

This commit is contained in:
Shannon Booth 2023-12-28 12:39:05 +13:00 committed by Andreas Kling
parent 6b88fc2e05
commit 7067c5c972
Notes: sideshowbarker 2024-07-17 16:23:55 +09:00

View file

@ -35,7 +35,7 @@ JS::ThrowCompletionOr<UnderlyingSource> UnderlyingSource::from_value(JS::VM& vm,
if (type_string == "bytes"sv)
underlying_source.type = ReadableStreamType::Bytes;
else
return vm.throw_completion<JS::TypeError>(ByteString::formatted("Unknown stream type '{}'", type_value));
return vm.throw_completion<JS::TypeError>(MUST(String::formatted("Unknown stream type '{}'", type_value)));
}
if (TRY(object.has_property("autoAllocateChunkSize"))) {