mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-10 14:44:28 +02:00
ok optimistic parsing going
This commit is contained in:
parent
8a1986a923
commit
f8b9c8b583
9 changed files with 1509 additions and 1317 deletions
|
@ -91,6 +91,19 @@ var CommandBuffer = Backbone.Model.extend({
|
|||
}
|
||||
|
||||
var Main = require('../app');
|
||||
var eventBaton = Main.getEventBaton();
|
||||
|
||||
var numListeners = eventBaton.getNumListeners(eventName);
|
||||
if (!numListeners) {
|
||||
var Errors = require('../util/errors');
|
||||
command.set('error', new Errors.GitError({
|
||||
msg: 'That command is valid, but not supported in this current environment!' +
|
||||
' Try entering a level or level builder to use that command'
|
||||
}));
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
Main.getEventBaton().trigger(eventName, command, deferred);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue