mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
AK: Port URL::m_query from DeprecatedString to String
This commit is contained in:
parent
55a01e72ca
commit
21fe86d235
14 changed files with 63 additions and 75 deletions
|
@ -106,11 +106,11 @@ WebIDL::ExceptionOr<String> WorkerLocation::search() const
|
|||
auto const& query = m_global_scope->url().query();
|
||||
|
||||
// 2. If query is either null or the empty string, return the empty string.
|
||||
if (query.is_empty())
|
||||
if (!query.has_value() || query->is_empty())
|
||||
return String {};
|
||||
|
||||
// 3. Return "?", followed by query.
|
||||
return TRY_OR_THROW_OOM(vm, String::formatted("?{}", query.view()));
|
||||
return TRY_OR_THROW_OOM(vm, String::formatted("?{}", *query));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-workerlocation-hash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue