mirror of https://github.com/keeweb/keeweb.git
saving cookies during ajax requests, this could fix #810
This commit is contained in:
parent
1d72600e05
commit
62efa587cb
|
@ -58,6 +58,7 @@ _.extend(StorageBase.prototype, {
|
|||
}
|
||||
const statuses = config.statuses || [200];
|
||||
xhr.addEventListener('load', () => {
|
||||
CookieManager.saveCookies();
|
||||
if (statuses.indexOf(xhr.status) >= 0) {
|
||||
return config.success && config.success(xhr.response, xhr);
|
||||
}
|
||||
|
@ -80,6 +81,7 @@ _.extend(StorageBase.prototype, {
|
|||
}
|
||||
});
|
||||
xhr.addEventListener('error', () => {
|
||||
CookieManager.saveCookies();
|
||||
return config.error && config.error('network error', xhr);
|
||||
});
|
||||
xhr.addEventListener('timeout', () => {
|
||||
|
|
Loading…
Reference in New Issue