Merge branch 'master' of github.com:andris9/mailtrain

This commit is contained in:
Andris Reinman 2017-03-07 16:31:34 +02:00
commit 37531f2550
9 changed files with 52 additions and 60 deletions

View file

@ -188,7 +188,7 @@ function formatMessage(serviceUrl, campaign, list, subscription, message, filter
return message.replace(/\[([a-z0-9_]+)(?:\/([^\]]+))?\]/ig, (match, identifier, fallback) => {
identifier = identifier.toUpperCase();
let value = (getValue(identifier) || fallback || '').trim();
return value ? filter(value) : '';
return value ? filter(value) : match;
});
}