mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-10 06:34:26 +02:00
Use 'Array.prototype.forEach' instead of '_.each' and '_.forEach'
This commit is contained in:
parent
d87fd095c0
commit
bd8009386d
19 changed files with 74 additions and 82 deletions
|
@ -41,7 +41,7 @@ var validateLevel = function(level) {
|
|||
'solutionCommand'
|
||||
];
|
||||
|
||||
_.each(requiredFields, function(field) {
|
||||
requiredFields.forEach(function(field) {
|
||||
if (level[field] === undefined) {
|
||||
console.log(level);
|
||||
throw new Error('I need this field for a level: ' + field);
|
||||
|
@ -59,7 +59,7 @@ _.each(levelSequences, function(levels, levelSequenceName) {
|
|||
}
|
||||
|
||||
// for this particular sequence...
|
||||
_.each(levels, function(level, index) {
|
||||
levels.forEach(function(level, index) {
|
||||
validateLevel(level);
|
||||
|
||||
var id = levelSequenceName + String(index + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue