1
0
Fork 0

More graceful handling of contributors without e-mail in Aardvark

This commit is contained in:
Alan Plum 2016-11-16 16:44:23 +01:00
parent 9e6b031e8b
commit ce154316b1
No known key found for this signature in database
GPG Key ID: 8ED72A9A323B6EFD
1 changed files with 5 additions and 1 deletions

View File

@ -302,7 +302,11 @@
var contributors = '<p class="mount"><span>Contributors:</span>';
if (this.model.get('contributors') && this.model.get('contributors').length > 0) {
_.each(this.model.get('contributors'), function (contributor) {
contributors += '<a href="mailto:' + contributor.email + '">' + contributor.name + '</a>';
if (contributor.email) {
contributors += '<a href="mailto:' + contributor.email + '">' + (contributor.name || contributor.email) + '</a>';
} else if (contributor.name) {
contributors += '<a>contributor.name</a>';
}
});
} else {
contributors += 'No contributors';