diff --git a/Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp b/Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp index 4550ab3483b..a73e899fff3 100644 --- a/Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp +++ b/Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp @@ -179,7 +179,7 @@ void ServiceWorkerContainer::start_register(Optional 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; }