Resolve schema update promise even if repository update fails

This commit is contained in:
Dan Stillman 2017-08-04 16:48:21 +02:00
parent 2b3f6b4f1f
commit 198fb28e20

View File

@ -105,7 +105,12 @@ Zotero.Schema = new function(){
.then(async function () {
await this.updateBundledFiles();
if (Zotero.Prefs.get('automaticScraperUpdates')) {
await this.updateFromRepository(this.REPO_UPDATE_UPGRADE);
try {
await this.updateFromRepository(this.REPO_UPDATE_UPGRADE);
}
catch (e) {
Zotero.logError(e);
}
}
_schemaUpdateDeferred.resolve(true);
}.bind(this))
@ -220,7 +225,12 @@ Zotero.Schema = new function(){
.then(async function () {
await this.updateBundledFiles();
if (Zotero.Prefs.get('automaticScraperUpdates')) {
await this.updateFromRepository(this.REPO_UPDATE_STARTUP);
try {
await this.updateFromRepository(this.REPO_UPDATE_STARTUP);
}
catch (e) {
Zotero.logError(e);
}
}
_schemaUpdateDeferred.resolve(true);
}.bind(this));