File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments