Skip to content

Commit 9a396d8

Browse files
committed
Fix code header issue
1 parent 229cf3a commit 9a396d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/data.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ async function makeCSV() {
151151
const items = data;
152152
const replacer = (key, value) => value === null ? '' : value;
153153
// Add ball count, hatch count, and highest level to header
154-
items[0]['hatches-rocket'] = 0;
155-
items[0]['balls-rocket'] = 0;
156-
items[0]['highest-level'] = 0;
157154
const header = Object.keys(items[0]);
158155
let csv = items.map(row => {
159156
var highestLevel = 0;
@@ -177,6 +174,9 @@ async function makeCSV() {
177174
rowData += ',' + hatchCount + ',' + ballCount + ',' + highestLevel;
178175
return rowData;
179176
});
177+
header.push('hatches-rocket');
178+
header.push('balls-rocket');
179+
header.push('highest-level');
180180
csv.unshift(header.join(','));
181181
csv = csv.join('\r\n');
182182

0 commit comments

Comments
 (0)