Skip to content

Commit 25a55fd

Browse files
author
Henrik jJaven
committed
Minor change to build data
1 parent b5464fe commit 25a55fd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

frameworks/keyed/doohtml-dom/js/Main.class.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Doo.define(
5151
}
5252

5353
buildData(count = DEFAULT_SIZE) {
54-
const data = []
54+
const data = new Array(count)
5555
for (let i = 0; i < count; i++) {
56-
data.push({id: this.ID++,label: adjectives[_random(lenA)] + " " + colours[_random(lenB)] + " " + nouns[_random(lenC)]})
56+
data[i] = {id: this.ID++,label: `${adjectives[_random(lenA)]} ${colours[_random(lenB)]} ${nouns[_random(lenC)]}`}
5757
}
5858
return data
5959
}

frameworks/keyed/doohtml/js/Main.class.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Doo.define(
5454
}
5555

5656
buildData(count = DEFAULT_SIZE) {
57-
const data = []
57+
const data = new Array(count)
5858
for (let i = 0; i < count; i++) {
59-
data.push({id: this.ID++,label: adjectives[_random(lenA)] + " " + colours[_random(lenB)] + " " + nouns[_random(lenC)]})
59+
data[i] = {id: this.ID++,label: `${adjectives[_random(lenA)]} ${colours[_random(lenB)]} ${nouns[_random(lenC)]}`}
6060
}
6161
return data
6262
}

frameworks/non-keyed/doohtml/js/Main.class.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Doo.define(
5353
}
5454

5555
buildData(count = DEFAULT_SIZE) {
56-
const data = []
56+
const data = new Array(count)
5757
for (let i = 0; i < count; i++) {
58-
data.push({id: this.ID++,label: adjectives[_random(lenA)] + " " + colours[_random(lenB)] + " " + nouns[_random(lenC)]})
58+
data[i] = {id: this.ID++,label: `${adjectives[_random(lenA)]} ${colours[_random(lenB)]} ${nouns[_random(lenC)]}`}
5959
}
6060
return data
6161
}

0 commit comments

Comments
 (0)