1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

LibWeb: Fix inverted-if typo in flex_shrink_factor()

I messed this up when I changed it before, which was causing a crash.
This commit is contained in:
Sam Atkins 2021-08-20 14:38:45 +01:00 committed by Andreas Kling
parent 5d116372a8
commit 8f2ab524fa

View file

@ -361,7 +361,7 @@ Optional<float> StyleProperties::flex_shrink_factor() const
auto value = property(CSS::PropertyID::FlexShrink);
if (!value.has_value())
return {};
if (!value.value()->is_numeric()) {
if (value.value()->is_numeric()) {
auto numeric = verify_cast<CSS::NumericStyleValue>(value.value().ptr());
return numeric->value();
}