From bd4563d67ea260a8ea1ab9a5b093624babfbf5cd Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Tue, 30 Jun 2020 09:33:58 +0200 Subject: [PATCH] fix: check for column content before replacing --- lib/workers/pr/body/updates-table.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/workers/pr/body/updates-table.ts b/lib/workers/pr/body/updates-table.ts index fcaa2c362b0483..9be50667392fa8 100644 --- a/lib/workers/pr/body/updates-table.ts +++ b/lib/workers/pr/body/updates-table.ts @@ -62,8 +62,8 @@ export function getPrUpdatesTable(config: BranchConfig): string { let val = '|'; for (const column of tableColumns) { const content = row[column] - .replace(/^@/, '@​') - .replace(/\|/g, '\\|'); + ? row[column].replace(/^@/, '@​').replace(/\|/g, '\\|') + : ''; val += ` ${content} |`; } val += '\n';