Skip to content

Commit

Permalink
Fix onreadystatechange hook bug with promise never resolving.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhmd authored Dec 19, 2024
1 parent dcb9f77 commit 3eb454a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ function xhrRequest(
if (options.onreadystatechange) {
options.onreadystatechange(event, params);

return;
// This should not return, because if a hook is defined, that function
// will be called but the image load promise will never resolve.
// return;
}

// Default action
Expand Down

0 comments on commit 3eb454a

Please sign in to comment.