single from address was shown twice in mail display

This commit is contained in:
Ralf Becker 2014-09-23 08:45:10 +00:00
parent 712b9acd94
commit d83d3db364

View File

@ -636,8 +636,11 @@ app.classes.mail = AppJS.extend(
var content = _dataElem.data[field.data] || [];
// Add in single address, if there
if(typeof field.data_one != 'undefined')
if(typeof field.data_one != 'undefined' && field.data != field.data_one)
{
if (jQuery.isArray(_dataElem.data[field.data_one]))
content = content.concat(_dataElem.data[field.data_one]);
else
content.unshift(_dataElem.data[field.data_one]);
// Unique
content = content.filter(function(value, index, self) {