Fix get or set history on server ajax should not fallback to browser storage to avoid some internet edge cases
This commit is contained in:
parent
b6e68b2d36
commit
dc343978eb
1 changed files with 6 additions and 6 deletions
|
@ -165,8 +165,8 @@ function writeHistoryToServer(view) {
|
||||||
var newnotehistory = generateHistory(view, notehistory);
|
var newnotehistory = generateHistory(view, notehistory);
|
||||||
saveHistoryToServer(newnotehistory);
|
saveHistoryToServer(newnotehistory);
|
||||||
})
|
})
|
||||||
.fail(function () {
|
.fail(function (xhr, status, error) {
|
||||||
writeHistoryToStorage(view);
|
console.error(xhr.responseText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,8 +286,8 @@ function getServerHistory(callback) {
|
||||||
callback(data.history);
|
callback(data.history);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function () {
|
.fail(function (xhr, status, error) {
|
||||||
getStorageHistory(callback);
|
console.error(xhr.responseText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,8 +327,8 @@ function parseServerToHistory(list, callback) {
|
||||||
parseToHistory(list, data.history, callback);
|
parseToHistory(list, data.history, callback);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function () {
|
.fail(function (xhr, status, error) {
|
||||||
parseStorageToHistory(list, callback);
|
console.error(xhr.responseText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue