mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Revert "Use Q instead of Task.spawn to run processUpdatedXML()"
Fixes "Q.async(...)(...) is undefined" sync error
This reverts commit ad8b81f4c7 (which
tried to fix Fx32+ compatibility).
This commit is contained in:
parent
aee65951fd
commit
4334260865
2 changed files with 5 additions and 10 deletions
|
|
@ -1627,7 +1627,9 @@ Zotero.Sync.Server = new function () {
|
|||
_error(e);
|
||||
}
|
||||
|
||||
Q.async(Zotero.Sync.Server.Data.processUpdatedXML(
|
||||
Components.utils.import("resource://gre/modules/Task.jsm");
|
||||
|
||||
Task.spawn(Zotero.Sync.Server.Data.processUpdatedXML(
|
||||
responseNode.getElementsByTagName('updated')[0],
|
||||
lastLocalSyncDate,
|
||||
syncSession,
|
||||
|
|
@ -1836,7 +1838,7 @@ Zotero.Sync.Server = new function () {
|
|||
Zotero.HTTP.doPost(url, body, uploadCallback);
|
||||
}
|
||||
}
|
||||
))()
|
||||
))
|
||||
.then(
|
||||
null,
|
||||
function (e) {
|
||||
|
|
|
|||
|
|
@ -1021,14 +1021,7 @@ function async(makeGenerator) {
|
|||
}
|
||||
return when(result, callback, errback);
|
||||
}
|
||||
// Added by Dan
|
||||
// If already a generator, use that
|
||||
if (makeGenerator.send) {
|
||||
var generator = makeGenerator;
|
||||
}
|
||||
else {
|
||||
var generator = makeGenerator.apply(this, arguments);
|
||||
}
|
||||
var generator = makeGenerator.apply(this, arguments);
|
||||
var callback = continuer.bind(continuer, "send");
|
||||
var errback = continuer.bind(continuer, "throw");
|
||||
return callback();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue