Ver código fonte

LibWeb: Port TypeError in UnderlyingSource from ByteString

Shannon Booth 1 ano atrás
pai
commit
7067c5c972

+ 1 - 1
Userland/Libraries/LibWeb/Streams/UnderlyingSource.cpp

@@ -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"))) {