diff --git a/mail-merge/src/Code.js b/mail-merge/src/Code.js index bf2a3a7..7af9528 100644 --- a/mail-merge/src/Code.js +++ b/mail-merge/src/Code.js @@ -180,7 +180,7 @@ function sendEmails(subjectLine, sheet=SpreadsheetApp.getActiveSheet()) { // token replacement template_string = template_string.replace(/{{[^{}]+}}/g, key => { - return escapeData_(data[key.replace(/[{}]+/g, "")] || ""); + return escapeData_(data[key.replace(/[{}]+/g, "")]) || ""; }); return JSON.parse(template_string); }