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,9 +636,12 @@ app.classes.mail = AppJS.extend(
var content = _dataElem.data[field.data] || []; var content = _dataElem.data[field.data] || [];
// Add in single address, if there // Add in single address, if there
if(typeof field.data_one != 'undefined') if(typeof field.data_one != 'undefined' && field.data != field.data_one)
{ {
content.unshift(_dataElem.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 // Unique
content = content.filter(function(value, index, self) { content = content.filter(function(value, index, self) {
return self.indexOf(value) === index; return self.indexOf(value) === index;