Prechádzať zdrojové kódy

LibWeb: Fix bogus condition when checking CSS font file extensions

Thanks Idan for pointing this out! :^)
Andreas Kling 2 rokov pred
rodič
commit
1c0fc75cb6

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleComputer.cpp

@@ -1368,7 +1368,7 @@ void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)
 
             auto path = source.url.path();
             if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
-                || path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
+                && !path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
                 continue;
             }