Skip to content

Commit 3401598

Browse files
authored
Fix whitespace and add braces to one-line for loop
1) Prior to this change, viewing mixed tabs and spaces on GitHub caused the body of the for loop to have less visually preceding whitespace than the loop description itself. 2) I've included for loop braces to prevent any ambiguity for the reader. 3) Added a space between the reduce callback function and its opening brace to mirror the whitespace used on the first line.
1 parent 31b23ad commit 3401598

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/grab.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
module.exports = function(ulog, name, result) {
2-
ulog.mods.reduce(function(r,item){
2+
ulog.mods.reduce(function(r,item) {
33
if (Array.isArray(r) && (name in item)) {
44
r.push(item[name])
55
} else {
6-
for (var o in item[name])
7-
r[o] = item[name][o]
6+
for (var o in item[name]) {
7+
r[o] = item[name][o]
8+
}
89
}
910
return r
10-
}, result)
11-
return result
11+
}, result)
12+
return result
1213
}

0 commit comments

Comments
 (0)