Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 9a54eb5

Browse files
author
Necati Özal
committed
Bug fixes.
1 parent 13ef34b commit 9a54eb5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

queue.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525

2626
wait: function(ms) {
2727
this.put(function() {
28-
window.setTimeout(this.run.bind(this), ms);
28+
window.setTimeout(this.next.bind(this), ms);
2929
});
3030
},
3131
skip: function(count) {
3232
this.add(function() {
33-
this.index += count;
34-
this.run();
33+
this.queue.index += count;
34+
this.next();
3535
});
3636
},
3737
reset: function() {
@@ -57,11 +57,10 @@
5757
var queue = this.queue;
5858

5959
if( queue.index+1 in queue ) {
60-
queue.run(queue.index++);
60+
return queue.run(queue.index++);
6161
}
6262
return null;
6363
},
64-
6564
prev: function() {
6665
var queue = this.queue;
6766

0 commit comments

Comments
 (0)