More refinements for select handlers that do not use a callback

This commit is contained in:
Simon Kornblith 2011-07-01 17:25:26 +00:00
parent f18b13e882
commit 63e07763d7

View file

@ -388,9 +388,17 @@ Zotero.Translate.Sandbox = {
haveAsyncHandler = !callbackExecuted;
}
Zotero.debug("Translate: "+(haveAsyncHandler ? "" : "don't")+" have async handler");
Zotero.debug("Translate: "+(haveAsyncHandler ? "" : "don't")+" have async callback");
if(haveAsyncCallback) {
// we are running asynchronously, so increment async processes
if(haveAsyncHandler) translate.incrementAsyncProcesses();
if(haveAsyncHandler) {
// we are running asynchronously, so increment async processes
translate.incrementAsyncProcesses();
} else if(!callbackExecuted) {
// callback didn't get called from handler, so call it here
callback(returnedItems);
}
return false;
} else {
translate._debug("Translate: COMPAT WARNING: No callback was provided for "+