Skip to content

Commit 6a7adcf

Browse files
committed
minor modification to build data
1 parent 79d364e commit 6a7adcf

File tree

1 file changed

+5
-3
lines changed
  • frameworks/keyed/doohtml-lite/src

1 file changed

+5
-3
lines changed

frameworks/keyed/doohtml-lite/src/main.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ class Main {
5757
}
5858

5959
buildData(count = DEFAULT_SIZE) {
60-
const data = [];
61-
for (let i = 0; i < count; i++) {
62-
data.push({id: this.ID++,label: adjectives[_random(lenA)] + " " + colours[_random(lenB)] + " " + nouns[_random(lenC)]})
60+
const data = Array(count);
61+
for (let i = 0; i < count; i=i+1) {
62+
const label = `${adjectives[_random(lenA)]} ${colours[_random(lenB)]} ${nouns[_random(lenC)]}`
63+
const id = this.ID++
64+
data[i] = { id, label }
6365
}
6466
return data
6567
}

0 commit comments

Comments
 (0)