LibWeb/XHR: Don't construct a String from a String

Serializing a URL already returns a String.
This commit is contained in:
Shannon Booth 2025-07-12 13:18:16 +12:00 committed by Tim Ledbetter
parent f50f23b19f
commit 79293a3cbc
Notes: github-actions[bot] 2025-07-12 01:58:51 +00:00

View file

@ -1289,8 +1289,7 @@ String XMLHttpRequest::response_url()
if (!m_response->url().has_value())
return String {};
auto serialized = m_response->url().value().serialize(URL::ExcludeFragment::Yes);
return String::from_utf8_without_validation(serialized.bytes());
return m_response->url().value().serialize(URL::ExcludeFragment::Yes);
}
}