From ccc18dd41e8386f2623b4b56cbd7372ca9d27605 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 20 Aug 2013 12:43:39 -0400 Subject: [PATCH] Return the promise in Zotero.Translators.loadFromDisk() --- chrome/content/zotero/xpcom/translation/translators.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/translation/translators.js b/chrome/content/zotero/xpcom/translation/translators.js index fe1d41fa7..cb8b73515 100644 --- a/chrome/content/zotero/xpcom/translation/translators.js +++ b/chrome/content/zotero/xpcom/translation/translators.js @@ -152,7 +152,7 @@ Zotero.Translators = new function() { */ this.loadFromDisk = function(file) { const infoRe = /^\s*{[\S\s]*?}\s*?[\r\n]/; - Zotero.File.getContentsAsync(this.file).then(function(source) { + return Zotero.File.getContentsAsync(this.file).then(function(source) { return Zotero.Translators.load(file, infoRe.exec(source)[0], source); }).fail(function() { throw "Invalid or missing translator metadata JSON object in " + file.leafName;