From: Damien Lespiau Date: Mon, 24 Aug 2015 16:54:08 +0000 (+0100) Subject: filters: Fix submitter display when we only have an email address X-Git-Tag: v1.1.0~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f90344e7c6a97b9a989b1f335801716d715da69e;p=thirdparty%2Fpatchwork.git filters: Fix submitter display when we only have an email address I'm fairly sure I fixed that already, but here we go again. It's totally valid to only have an email address for the submitter, so handle that case properly. Signed-off-by: Damien Lespiau Acked-by: Stephen Finucane --- diff --git a/patchwork/templates/patchwork/filters.html b/patchwork/templates/patchwork/filters.html index fe0c9b85..65fd6bfe 100644 --- a/patchwork/templates/patchwork/filters.html +++ b/patchwork/templates/patchwork/filters.html @@ -54,11 +54,15 @@ $(document).ready(function() { }, render: { option: function(item, escape) { - return '
' + escape(item.name) + ' <' + - escape(item.email) + '>' + '
'; + if (item.name) + return '
' + escape(item.name) + ' <' + + escape(item.email) + '>' + '
'; + return '
' + escape(item.email) + '
'; }, item: function(item, escape) { - return '
' + escape(item.name) + '
'; + if (item.name) + return '
' + escape(item.name) + '
'; + return '
' + escape(item.email) + '
'; } }, load: function(query, callback) {