From 7a565d4892a1af46d07e452e3774a00d66275946 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Fri, 16 Sep 2022 11:00:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20duplicate=20error=20colu?= =?UTF-8?q?mns=20in=20members=20import=20error=20CSV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ghost/members-csv/lib/unparse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/members-csv/lib/unparse.js b/ghost/members-csv/lib/unparse.js index 895b2eea51..e0fa910355 100644 --- a/ghost/members-csv/lib/unparse.js +++ b/ghost/members-csv/lib/unparse.js @@ -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'); }