diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp index 5171433e43..4151fda074 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp @@ -288,7 +288,8 @@ WebIDL::ExceptionOr fetch_classic_script(JS::NonnullGCPtrdocument().url().to_deprecated_string(), source_text, settings_object, response->url().value_or({}), 1, muted_errors); + auto response_url = response->url().value_or({}); + auto script = ClassicScript::create(response_url.to_deprecated_string(), source_text, settings_object, response_url, 1, muted_errors); // 8. Run onComplete given script. on_complete(script);