turn getCommandsThatCount into a map

This commit is contained in:
Siddharth Agarwal 2013-07-31 01:06:35 -07:00
parent 54414925fa
commit 9821df3bb7
3 changed files with 21 additions and 18 deletions

View file

@ -309,9 +309,10 @@ var Level = Sandbox.extend({
}
var matched = false;
_.each(GitCommands.commands.getCommandsThatCount(), function(name) {
var regex = GitCommands.commands.getRegex(name);
matched = matched || regex.test(command.get('rawStr'));
_.each(GitCommands.commands.getCommandsThatCount(), function(map) {
_.each(map, function(regex) {
matched = matched || regex.test(command.get('rawStr'));
});
});
if (matched) {
this.gitCommandsIssued.push(command.get('rawStr'));