소스 검색

LibWeb: Fix logic typo in URL::parse()

I couldn't find a way to hit this function with our current testing
infrastructure, but since it breaks many websites, let's just get a
fix in immediately.

Regressed in 6fecd8cc44342c4aba25098fc88b988898df6fc1.
Andreas Kling 2 년 전
부모
커밋
eb1f61f3b1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Userland/Libraries/LibWeb/URL/URL.cpp

+ 1 - 1
Userland/Libraries/LibWeb/URL/URL.cpp

@@ -499,7 +499,7 @@ AK::URL parse(StringView input, Optional<AK::URL> const& base_url)
     auto url = URLParser::basic_parse(input, base_url);
 
     // 2. If url is failure, return failure.
-    if (url.is_valid())
+    if (!url.is_valid())
         return {};
 
     // 3. If url’s scheme is not "blob",