diff --git a/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp b/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp index 0fc2d4ffcd..0d0bd93137 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp @@ -29,12 +29,12 @@ StyleInvalidator::~StyleInvalidator() return; auto& style_computer = m_document.style_computer(); m_document.for_each_in_inclusive_subtree_of_type([&](auto& element) { - auto maybe_matching_rules_before = m_elements_and_matching_rules_before.get(&element); - if (!maybe_matching_rules_before.has_value()) { + auto matching_rules_before_iter = m_elements_and_matching_rules_before.find(&element); + if (matching_rules_before_iter == m_elements_and_matching_rules_before.end()) { element.set_needs_style_update(true); return IterationDecision::Continue; } - auto& matching_rules_before = maybe_matching_rules_before.value(); + auto& matching_rules_before = matching_rules_before_iter->value; auto matching_rules_after = style_computer.collect_matching_rules(element); if (matching_rules_before.size() != matching_rules_after.size()) { element.set_needs_style_update(true);