mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +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:
parent
c86b5068d0
commit
dc2b0e17bf
Notes:
github-actions[bot]
2025-02-19 13:03:18 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/dc2b0e17bf6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3609 Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue