From 8cf783b260333314638984e82bd6ef6165758cd1 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sat, 13 Jan 2024 17:30:32 +1300 Subject: [PATCH] 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. --- Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp b/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp index 1ae41f2614..9aea6b2228 100644 --- a/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp +++ b/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp @@ -188,7 +188,7 @@ Attr const* NamedNodeMap::get_attribute_ns(Optional const& namespace_ // 1. If namespace is the empty string, then set it to null. Optional normalized_namespace; - if (namespace_.has_value() && namespace_->is_empty()) + if (namespace_ != String {}) normalized_namespace = namespace_; // 2. Return the attribute in element’s attribute list whose namespace is namespace and local name is localName, if any; otherwise null.