Skip to content

Commit

Permalink
Fix the duplicated ajax requests
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jun 25, 2021
1 parent 027a5ea commit 88c00ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/lib/r2.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ function Ajax(method, uri, body, fn, err) {
x.onreadystatechange = function() {
ajax_in_process = false;
if (x.status == 200) {
if (x.readyState < 4) {
// wait until request is complete
return;
}
if (fn) {
fn(x.responseText);
} else {
Expand Down

0 comments on commit 88c00ef

Please sign in to comment.