diff options
author | Andrew Dolgov <[email protected]> | 2018-10-16 08:42:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-10-16 08:42:13 +0300 |
commit | a0c3cd5ce5e95c55e1d96e289139c8e2550a6e44 (patch) | |
tree | 49fb9cceeccdd67ad3007a83b76e799a661ebead /js/read.js | |
parent | 0bbe4f935782d9f771c640168521ba3fbd2db79e (diff) |
properly handle closing reader UI if current session is invalid
Diffstat (limited to 'js/read.js')
-rw-r--r-- | js/read.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -233,6 +233,9 @@ function save_and_close() { $.post("backend.php", { op: "storelastread", id: $.urlParam("id"), page: currentPage, cfi: currentCfi }, function(data) { window.location = $.urlParam("rt") ? "index.php?mode=" + $.urlParam("rt") : "index.php"; + }) + .fail(function() { + window.location = "index.php"; }); } else { window.location = "index.php"; |