commit 8f65c52f6cf161f6413f67984a56855d9a70086a
parent 3f69b8b9c09ceb9502f7ea766c2fda9b17805c9d
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 31 May 2011 20:01:55 +0000
clear queued callbacks once they have been requeued and fix typo
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -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