🐛 Fixed duplicate error columns in members import error CSV

fixes https://github.com/TryGhost/Team/issues/1911

Kept on creating a new error column when unparsing the error list. So for every error we would create a new column when it was already added.
This commit is contained in:
Simon Backx 2022-09-16 11:00:35 +02:00
parent 2769578dbd
commit 7a565d4892

View File

@ -22,7 +22,7 @@ const unparse = (members, columns = DEFAULT_COLUMNS.slice()) => {
return column;
});
const mappedMembers = members.map((member) => {
if (member.error) {
if (member.error && !columns.includes('error')) {
columns.push('error');
}