commit f6e0b8a8b03e8ece9aca6c4e91b60987f877f33f
parent 1415b9fe45cd2b1192137e3ce04a6b5420000935
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 30 Dec 2015 05:08:12 -0500
Fix error in Zotero protocol handler when viewing snapshots
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js
@@ -1156,6 +1156,10 @@ AsyncChannel.prototype = {
var resolve;
var reject;
+ var promise = new Zotero.Promise(function () {
+ resolve = arguments[0];
+ reject = arguments[1];
+ });
var listenerWrapper = {
onStartRequest: function (request, context) {
@@ -1260,6 +1264,8 @@ AsyncChannel.prototype = {
Zotero.debug("AsyncChannel request succeeded in " + (new Date - t) + " ms");
channel._isPending = false;
}
+
+ return promise;
} catch (e) {
Zotero.debug(e, 1);
if (channel._isPending) {