We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1f487c commit 13b9c82Copy full SHA for 13b9c82
gmail/mailmerge/mailmerge.gs
@@ -196,7 +196,7 @@ function fillInTemplateFromObject(template, data) {
196
197
// Replace variables from the template with the actual values from the data object.
198
// If no value is available, replace with the empty string.
199
- for (var i = 0; i < templateVars.length; ++i) {
+ for (var i = 0; templateVars && i < templateVars.length; ++i) {
200
// normalizeHeader ignores ${"} so we can call it directly here.
201
// [START apps_script_gmail_template_variable_data]
202
var variableData = data[normalizeHeader(templateVars[i])];
0 commit comments