diff --git a/modules/ui/note_comments.js b/modules/ui/note_comments.js index 7c11bae57..9fc9a64f4 100644 --- a/modules/ui/note_comments.js +++ b/modules/ui/note_comments.js @@ -53,15 +53,18 @@ export function uiNoteComments() { .attr('href', osm.userURL(d.user)) .attr('target', '_blank'); } - selection - .html(function(d) { return d.user || t.html('note.anonymous'); }); + if (d.user) { + selection.text(d.user); + } else { + selection.html(t.html('note.anonymous')); + } }); metadataEnter .append('div') .attr('class', 'comment-date') .html(function(d) { - return t('note.status.' + d.action, { when: localeDateString(d.date) }); + return t.html('note.status.' + d.action, { when: localeDateString(d.date) }); }); mainEnter