diff --git a/dreditor.user.js b/dreditor.user.js index 51ba72f..86fad11 100644 --- a/dreditor.user.js +++ b/dreditor.user.js @@ -1601,11 +1601,11 @@ Drupal.behaviors.dreditorIssueSummaryTemplate = function() { if (nodePath) { $.getJSON(nodePath[0] + '/project-issue/json', function(json){ var $profileLink, $bodyVal = $('
').html($body.val()); - if (json.authorUrl) { - $profileLink = $('').text('@' + json.authorName).attr('href', json.authorUrl); + if (!json.authorId || !json.authorName || !json.authorUrl) { + $profileLink = $('').text('Anonymous').attr('href', '#'); } else { - $profileLink = $('').text('Anonymous').attr('href', '#'); + $profileLink = $('').text('@' + json.authorName).attr('href', json.authorUrl); } $bodyVal.find('#summary-original-report a').replaceWith($('
').html($profileLink).html()); $body.val($bodyVal.html());