mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
LibWeb/Fetch: Actually check if the response is null in recursive fetch
The condition for checking if there was already a response in recursive fetch was accidentally flipped, always causing a null deref. This made redirects crash for example.
This commit is contained in:
parent
0524bc1d13
commit
b91b67f4f3
1 changed files with 1 additions and 1 deletions
|
@ -363,7 +363,7 @@ WebIDL::ExceptionOr<Optional<JS::NonnullGCPtr<PendingResponse>>> main_fetch(JS::
|
||||||
if (recursive == Recursive::Yes) {
|
if (recursive == Recursive::Yes) {
|
||||||
// 11. If response is null, then set response to the result of running the steps corresponding to the first
|
// 11. If response is null, then set response to the result of running the steps corresponding to the first
|
||||||
// matching statement:
|
// matching statement:
|
||||||
auto pending_response = response
|
auto pending_response = !response
|
||||||
? TRY(get_response())
|
? TRY(get_response())
|
||||||
: PendingResponse::create(vm, request, *response);
|
: PendingResponse::create(vm, request, *response);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue