1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibWeb: Fix normalizing namespace in NamedNodeMap::get_attribute_ns

There was a typo which effectively meant that the namespace was always
being set to null when given.
This commit is contained in:
Shannon Booth 2024-01-13 17:30:32 +13:00 committed by Andreas Kling
parent 636a85f04e
commit 8cf783b260

View file

@ -188,7 +188,7 @@ Attr const* NamedNodeMap::get_attribute_ns(Optional<FlyString> const& namespace_
// 1. If namespace is the empty string, then set it to null.
Optional<FlyString> normalized_namespace;
if (namespace_.has_value() && namespace_->is_empty())
if (namespace_ != String {})
normalized_namespace = namespace_;
// 2. Return the attribute in elements attribute list whose namespace is namespace and local name is localName, if any; otherwise null.