diff options
author | Kohei Yoshino <kohei.yoshino@gmail.com> | 2018-01-09 23:42:57 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-01-09 23:42:57 +0100 |
commit | 22467136063067ad0a5cf442be67691fc296ce31 (patch) | |
tree | f906328b3b4948bbb6e7a2b691068a23745b4e45 /extensions/Review/web/js | |
parent | 97b6836127618dcfe0b3da72f8748a5cbba3bb8a (diff) | |
download | bugzilla-22467136063067ad0a5cf442be67691fc296ce31.tar.gz bugzilla-22467136063067ad0a5cf442be67691fc296ce31.tar.xz |
Bug 1429194 - Clicking requests icon gives "Loading... " but never actually completes
Diffstat (limited to 'extensions/Review/web/js')
-rw-r--r-- | extensions/Review/web/js/badge.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/Review/web/js/badge.js b/extensions/Review/web/js/badge.js index d22ca4e57..f5f8cc236 100644 --- a/extensions/Review/web/js/badge.js +++ b/extensions/Review/web/js/badge.js @@ -76,8 +76,8 @@ Bugzilla.Review.Badge = class Badge { // Show up to 20 newest requests requests.slice(0, 20).forEach(req => { const $li = document.createElement('li'); - const [, name, email] = req.requester.match(/^(.*)\s<(.*)>$/); - const pretty_name = name.replace(/([\[\(<‹].*?[›>\)\]]|\:[\w\-]+|\s+\-\s+.*)/g, '').trim(); + const [, name, email] = req.requester.match(/^(?:(.*)\s<)?(.+?)>?$/); + const pretty_name = name ? name.replace(/([\[\(<‹].*?[›>\)\]]|\:[\w\-]+|\s+\-\s+.*)/g, '').trim() : email; const link = req.attach_id && req.dup_count === 1 ? `attachment.cgi?id=${req.attach_id}&action=edit` : `show_bug.cgi?id=${req.bug_id}`; |