Skip to content

Commit e78d598

Browse files
committed
changed for to forEach
1 parent dd799e7 commit e78d598

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

react-v16.0.0-redux-v3.7.2-keyed/src/store.es6.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ var initialState = fromJS({
8585
let id = 1;
8686

8787
function buildData(count = 1000) {
88-
let output = [];
89-
for(let i=0;i<count;i++){
90-
output.push({
88+
let output = fromJS([]);
89+
new Array(count).fill(' ').forEach(() => {
90+
output = output.push(fromJS({
9191
id: id++,
9292
label: adjectives[_random(adjectives.length)] + " " + colours[_random(colours.length)] + " " + nouns[_random(nouns.length)]
93-
});
94-
}
95-
return fromJS(output);
93+
}));
94+
});
95+
return output;
9696
}
9797

9898
function dataStore(state = initialState, action) {

0 commit comments

Comments
 (0)