aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2015-08-24 17:54:08 +0100
committerStephen Finucane <stephen.finucane@intel.com>2015-11-05 03:56:27 +0000
commitf90344e7c6a97b9a989b1f335801716d715da69e (patch)
tree5001f4673ea144101883fea05c7932ef10e11fbc
parentedffce4856d4f5d86ca6c819de14cd43f9c4a333 (diff)
downloadpatchwork-f90344e7c6a97b9a989b1f335801716d715da69e.tar
patchwork-f90344e7c6a97b9a989b1f335801716d715da69e.tar.gz
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 <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
-rw-r--r--patchwork/templates/patchwork/filters.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/patchwork/templates/patchwork/filters.html b/patchwork/templates/patchwork/filters.html
index fe0c9b8..65fd6bf 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 '<div>' + escape(item.name) + ' &lt;' +
- escape(item.email) + '&gt;' + '</div>';
+ if (item.name)
+ return '<div>' + escape(item.name) + ' &lt;' +
+ escape(item.email) + '&gt;' + '</div>';
+ return '<div>' + escape(item.email) + '</div>';
},
item: function(item, escape) {
- return '<div>' + escape(item.name) + '</div>';
+ if (item.name)
+ return '<div>' + escape(item.name) + '</div>';
+ return '<div>' + escape(item.email) + '</div>';
}
},
load: function(query, callback) {