From dc2b0e17bf6668ac76839523a3c9ad25bb3a6c47 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 16 Feb 2025 14:05:25 +1300 Subject: [PATCH] LibWeb/ServiceWorker: Use has_value for checking for invalid URL This is the correct API to call here. --- Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp b/Libraries/LibWeb/ServiceWorker/ServiceWorkerContainer.cpp index 4550ab3483..a73e899fff 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; }