Skip to content

Commit dc34397

Browse files
committed
Fix get or set history on server ajax should not fallback to browser storage to avoid some internet edge cases
1 parent b6e68b2 commit dc34397

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

public/js/history.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ function writeHistoryToServer(view) {
165165
var newnotehistory = generateHistory(view, notehistory);
166166
saveHistoryToServer(newnotehistory);
167167
})
168-
.fail(function () {
169-
writeHistoryToStorage(view);
168+
.fail(function (xhr, status, error) {
169+
console.error(xhr.responseText);
170170
});
171171
}
172172

@@ -286,8 +286,8 @@ function getServerHistory(callback) {
286286
callback(data.history);
287287
}
288288
})
289-
.fail(function () {
290-
getStorageHistory(callback);
289+
.fail(function (xhr, status, error) {
290+
console.error(xhr.responseText);
291291
});
292292
}
293293

@@ -327,8 +327,8 @@ function parseServerToHistory(list, callback) {
327327
parseToHistory(list, data.history, callback);
328328
}
329329
})
330-
.fail(function () {
331-
parseStorageToHistory(list, callback);
330+
.fail(function (xhr, status, error) {
331+
console.error(xhr.responseText);
332332
});
333333
}
334334

0 commit comments

Comments
 (0)