mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/ServiceWorker: Use has_value for checking for invalid URL
This is the correct API to call here.
This commit is contained in:
@@ -179,7 +179,7 @@ void ServiceWorkerContainer::start_register(Optional<URL::URL> scope_url, Option
|
||||
}
|
||||
|
||||
// 6. If scopeURL is failure, reject promise with a TypeError and abort these steps.
|
||||
if (!scope_url->is_valid()) {
|
||||
if (!scope_url.has_value()) {
|
||||
WebIDL::reject_promise(realm, promise, JS::TypeError::create(realm, "scopeURL is not a valid URL"sv));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user