0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

🐛 Fixed email card replacements showing raw replacement text in emails

closes https://github.com/TryGhost/Ghost/issues/12257

- there was a destructuring problem introduced in the recent email refactor which meant the correct replacement data was not being passed over to the Mailgun provider when sending email
This commit is contained in:
Kevin Ansfield 2020-10-05 17:24:48 +01:00
parent 4f211d025d
commit cde364bf27

View file

@ -221,8 +221,8 @@ module.exports = {
recipient.member_first_name = (recipient.member_name || '').split(' ')[0];
// dynamic data from replacements
replacements.forEach((id, recipientProp, fallback) => {
data[id] = recipient[recipientProp] || fallback || '';
replacements.forEach(({id, recipientProperty, fallback}) => {
data[id] = recipient[recipientProperty] || fallback || '';
});
recipientData[recipient.member_email] = data;