From 198fb28e20250447f68e9c65858ac8eb0289ff62 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 4 Aug 2017 16:48:21 +0200 Subject: [PATCH] Resolve schema update promise even if repository update fails --- chrome/content/zotero/xpcom/schema.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 4783758e4e..a3c90e8a70 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -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));