summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-10 20:50:01 +0800
committerWu Cheng-Han2016-10-10 20:50:01 +0800
commitdc343978eb29da741b7f52137e042996ab78b63a (patch)
tree2152a95ee1fcee3167379e421564ec47ad0f3499 /public
parentb6e68b2d36c15b7cd91f8820b766f929c01721ad (diff)
Fix get or set history on server ajax should not fallback to browser storage to avoid some internet edge cases
Diffstat (limited to 'public')
-rw-r--r--public/js/history.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/public/js/history.js b/public/js/history.js
index c974612b..f9ce2267 100644
--- a/public/js/history.js
+++ b/public/js/history.js
@@ -165,8 +165,8 @@ function writeHistoryToServer(view) {
var newnotehistory = generateHistory(view, notehistory);
saveHistoryToServer(newnotehistory);
})
- .fail(function () {
- writeHistoryToStorage(view);
+ .fail(function (xhr, status, error) {
+ console.error(xhr.responseText);
});
}
@@ -286,8 +286,8 @@ function getServerHistory(callback) {
callback(data.history);
}
})
- .fail(function () {
- getStorageHistory(callback);
+ .fail(function (xhr, status, error) {
+ console.error(xhr.responseText);
});
}
@@ -327,8 +327,8 @@ function parseServerToHistory(list, callback) {
parseToHistory(list, data.history, callback);
}
})
- .fail(function () {
- parseStorageToHistory(list, callback);
+ .fail(function (xhr, status, error) {
+ console.error(xhr.responseText);
});
}