Skip to content

Commit

Permalink
Only process current queue if it is set
Browse files Browse the repository at this point in the history
fixes #49
  • Loading branch information
joeduncan authored and defunctzombie committed Sep 9, 2015
1 parent 5c14616 commit 6255881
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ function drainQueue() {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
currentQueue[queueIndex].run();
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
Expand Down

0 comments on commit 6255881

Please sign in to comment.