Skip to content

Commit

Permalink
fix bug in csv_row() as array is pass by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
kensoh committed Feb 29, 2020
1 parent 35d74ac commit 774780e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tagui_header.js
Expand Up @@ -313,7 +313,8 @@ function sanitise_csv_cell(cell_data) {
* @param {string[]} row_data a 1-D array of strings denoting data to
* encode as a CSV row
*/
function csv_row(row_data) {
function csv_row(original_row_data) {
var row_data = original_row_data.slice()
// if row_data has at least 1 element, extract and sanitise first element
// else start_element is empty string
var start_element = (row_data.length > 0)
Expand Down

1 comment on commit 774780e

@kensoh
Copy link
Member Author

@kensoh kensoh commented on 774780e Feb 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to context of this bug and fix - aisingapore@33dad12

Please sign in to comment.