Use 'Object.values' and 'Object.keys' instead of '_.each(object)'

This commit is contained in:
Hongarc 2018-12-01 12:33:23 +07:00
parent bd8009386d
commit 96ddb5041a
9 changed files with 52 additions and 33 deletions

View file

@ -406,8 +406,9 @@ var Level = Sandbox.extend({
}
var matched = false;
_.each(Commands.commands.getCommandsThatCount(), function(map) {
_.each(map, function(regex) {
var commandsThatCount = Commands.commands.getCommandsThatCount();
Object.values(commandsThatCount).forEach(function(map) {
Object.values(map).forEach(function(regex) {
matched = matched || regex.test(command.get('rawStr'));
});
});