Skip to content

Commit

Permalink
fix firefox double reload :'( (#40)
Browse files Browse the repository at this point in the history
* fix firefox double reload :'(

* Update ajax.js
  • Loading branch information
BFoucher authored and lenybernard committed Aug 7, 2017
1 parent 84bbb61 commit 7b4520f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Resources/public/js/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,12 @@ function handleJson(json, update, updateStrategy, effect) {
}
// redirect is an url
if (json.hasOwnProperty("redirect")) {
// On firefox location.reload and window.location do not stop the execution of the script. We need to run only 1 command to avoid a double redirection
if (window.location == json.redirect) {
location.reload(true);
} else {
window.location = json.redirect;
}
window.location = json.redirect;
}
}

Expand Down

0 comments on commit 7b4520f

Please sign in to comment.