Skip to content

Commit

Permalink
Fix splicing logic to return proper spliced array
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuester committed Nov 5, 2024
1 parent cd079cc commit 47d6385
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fn/edit-contacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ const getCsvRowFilterFn = (uuidIndex, toIncludeIndex) => {
return row => toIncludeIndex.map(index => row[index]);
}

return row => [...row].splice(uuidIndex,1);
return row => {
const updatedRow = [...row];
updatedRow.splice(uuidIndex, 1);
return updatedRow;
};
};

const isColNameProtected = col => EDIT_RESERVED_COL_NAMES.includes(col.split('.')[0]);
Expand Down

0 comments on commit 47d6385

Please sign in to comment.