mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-16 09:34:28 +02:00
fixing some more bugs
This commit is contained in:
parent
8ebb53b983
commit
94db9a3c7d
6 changed files with 37 additions and 11 deletions
|
@ -33,12 +33,9 @@ var CommandBuffer = Backbone.Model.extend({
|
|||
// processed. if it's not, we immediately process the first item
|
||||
// and then set the timeout.
|
||||
if (this.timeout) {
|
||||
console.log('timeout exists abort');
|
||||
// timeout existence implies its being processed
|
||||
return;
|
||||
}
|
||||
console.log(this.timeout);
|
||||
console.log('setting timeout');
|
||||
this.setTimeout();
|
||||
},
|
||||
|
||||
|
@ -57,11 +54,13 @@ var CommandBuffer = Backbone.Model.extend({
|
|||
|
||||
// find a command with no error
|
||||
while (popped.get('error') && this.buffer.length) {
|
||||
popped = buffer.pop();
|
||||
popped = this.buffer.pop();
|
||||
}
|
||||
if (!popped.get('error')) {
|
||||
// pass in a callback, so when this command is "done" we will process the next.
|
||||
events.trigger('processCommand', popped, callback);
|
||||
} else {
|
||||
this.clear();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue