summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-10-16 08:42:13 +0300
committerAndrew Dolgov <[email protected]>2018-10-16 08:42:13 +0300
commita0c3cd5ce5e95c55e1d96e289139c8e2550a6e44 (patch)
tree49fb9cceeccdd67ad3007a83b76e799a661ebead
parent0bbe4f935782d9f771c640168521ba3fbd2db79e (diff)
properly handle closing reader UI if current session is invalid
-rw-r--r--js/read.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/read.js b/js/read.js
index 5739799..a5698ff 100644
--- a/js/read.js
+++ b/js/read.js
@@ -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";