Sfoglia il codice sorgente

LibWeb: Port TypeError in UnderlyingSource from ByteString

Shannon Booth 1 anno fa
parent
commit
7067c5c972
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Userland/Libraries/LibWeb/Streams/UnderlyingSource.cpp

+ 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)
         if (type_string == "bytes"sv)
             underlying_source.type = ReadableStreamType::Bytes;
             underlying_source.type = ReadableStreamType::Bytes;
         else
         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"))) {
     if (TRY(object.has_property("autoAllocateChunkSize"))) {