From d824d077844357b74cdf743d80955560b2022d8f Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Sun, 16 Apr 2023 17:40:17 -0700 Subject: [PATCH] LibWeb: Fix inverted condition in WritableStream's constructor --- Userland/Libraries/LibWeb/Streams/WritableStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Streams/WritableStream.cpp b/Userland/Libraries/LibWeb/Streams/WritableStream.cpp index 83e385a222..76449faf7a 100644 --- a/Userland/Libraries/LibWeb/Streams/WritableStream.cpp +++ b/Userland/Libraries/LibWeb/Streams/WritableStream.cpp @@ -30,7 +30,7 @@ WebIDL::ExceptionOr> WritableStream::construct_ auto underlying_sink_dict = TRY(UnderlyingSink::from_value(vm, underlying_sink)); // 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 }; // 4. Perform ! InitializeWritableStream(this).