Parcourir la source

LibWeb: Fix inverted condition in WritableStream's constructor

Matthew Olsson il y a 2 ans
Parent
commit
d824d07784
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Userland/Libraries/LibWeb/Streams/WritableStream.cpp

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

@@ -30,7 +30,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WritableStream>> WritableStream::construct_
     auto underlying_sink_dict = TRY(UnderlyingSink::from_value(vm, underlying_sink));
     auto underlying_sink_dict = TRY(UnderlyingSink::from_value(vm, underlying_sink));
 
 
     // 3. If underlyingSinkDict["type"] exists, throw a RangeError exception.
     // 3. If underlyingSinkDict["type"] exists, throw a RangeError exception.
-    if (!underlying_sink_dict.type.has_value())
+    if (underlying_sink_dict.type.has_value())
         return WebIDL::SimpleException { WebIDL::SimpleExceptionType::RangeError, "Invalid use of reserved key 'type'"sv };
         return WebIDL::SimpleException { WebIDL::SimpleExceptionType::RangeError, "Invalid use of reserved key 'type'"sv };
 
 
     // 4. Perform ! InitializeWritableStream(this).
     // 4. Perform ! InitializeWritableStream(this).