[FIX] mail: popover email icon without any customer email data

Before this commit, when hovering on a email icon of a message
in chatter without any customer email data, there was a crash
with the following error message:

"No enumerator given to foreach"

This was caused by `undefined` being passed to `t-foreach` when
there are no customer email data on the message. Since
`undefined == null`, it raised the error above.

closes odoo/odoo#31587

Signed-off-by: =?utf-8?b?QWxleGFuZHJlIEvDvGhuIChha3Up?= <aku@odoo.com>
This commit is contained in:
jev
2019-03-05 11:30:42 +00:00
committed by Alexandre Kühn
parent 1f670ad81f
commit b5885f0cb0
+1 -1
View File
@@ -475,7 +475,7 @@ var ThreadWidget = Widget.extend({
return message.getID() === messageID;
});
return QWeb.render('mail.widget.Thread.Message.MailTooltip', {
data: message.getCustomerEmailData()
data: message.hasCustomerEmailData() ? message.getCustomerEmailData() : [],
});
},
});