clear queued callbacks once they have been requeued and fix typo
This commit is contained in:
parent
3f69b8b9c0
commit
8f65c52f6c
1 changed files with 2 additions and 1 deletions
|
@ -1376,6 +1376,7 @@ var Zotero = new function(){
|
|||
createInstance(Components.interfaces.nsITimer);
|
||||
timer.initWithCallback(timerCallback, 0, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
_waitTimerCallbacks = [];
|
||||
|
||||
//Zotero.debug("Waited " + cycles + " cycles");
|
||||
return;
|
||||
|
@ -1394,7 +1395,7 @@ var Zotero = new function(){
|
|||
var timerCallback = {"notify":function() {
|
||||
if(_waiting) {
|
||||
// if our callback gets called during Zotero.wait(), queue it to be set again
|
||||
// when Zotero.wait() complets
|
||||
// when Zotero.wait() completes
|
||||
_waitTimerCallbacks.push(timerCallback);
|
||||
} else {
|
||||
// otherwise, execute callback function
|
||||
|
|
Loading…
Add table
Reference in a new issue