From dc343978eb29da741b7f52137e042996ab78b63a Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 10 Oct 2016 20:50:01 +0800 Subject: Fix get or set history on server ajax should not fallback to browser storage to avoid some internet edge cases --- public/js/history.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'public/js') 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); }); } -- cgit v1.2.3