Fix error in Zotero protocol handler when viewing snapshots
This commit is contained in:
parent
1415b9fe45
commit
f6e0b8a8b0
|
@ -1156,6 +1156,10 @@ AsyncChannel.prototype = {
|
||||||
|
|
||||||
var resolve;
|
var resolve;
|
||||||
var reject;
|
var reject;
|
||||||
|
var promise = new Zotero.Promise(function () {
|
||||||
|
resolve = arguments[0];
|
||||||
|
reject = arguments[1];
|
||||||
|
});
|
||||||
|
|
||||||
var listenerWrapper = {
|
var listenerWrapper = {
|
||||||
onStartRequest: function (request, context) {
|
onStartRequest: function (request, context) {
|
||||||
|
@ -1260,6 +1264,8 @@ AsyncChannel.prototype = {
|
||||||
Zotero.debug("AsyncChannel request succeeded in " + (new Date - t) + " ms");
|
Zotero.debug("AsyncChannel request succeeded in " + (new Date - t) + " ms");
|
||||||
channel._isPending = false;
|
channel._isPending = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return promise;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Zotero.debug(e, 1);
|
Zotero.debug(e, 1);
|
||||||
if (channel._isPending) {
|
if (channel._isPending) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user