Skip to content

Commit

Permalink
more memory friendly way to cycle through entries - we get rid of old…
Browse files Browse the repository at this point in the history
… entries after they've been added
  • Loading branch information
mastef committed Nov 1, 2017
1 parent f01ee4b commit 1795596
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ var GoogleSpreadsheet = function( ss_key, auth_id, options ){
var cells = [];
var entries = forceArray(data['entry']);
var i = 0;
entries.forEach(function( cell_data ){
cells.push( new SpreadsheetCell( self, worksheet_id, cell_data ) );
});
while(entries.length > 0) {
cells.push( new SpreadsheetCell( self, worksheet_id, entries.shift() ) );
}

cb( null, cells );
});
Expand Down

0 comments on commit 1795596

Please sign in to comment.