[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:
@@ -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() : [],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user