diff --git a/public/src/forum/topic/postTools.js b/public/src/forum/topic/postTools.js index 05b859d770..36243dad79 100644 --- a/public/src/forum/topic/postTools.js +++ b/public/src/forum/topic/postTools.js @@ -74,12 +74,12 @@ define(['composer', 'share'], function(composer, share) { } } - var username = getUserName(button); + var username = getUserName(selectionText ? $(selection.baseNode) : button); if (selectionText.length) { composer.addQuote(tid, getPid(button), topicName, username, selectionText); } else { - composer.newReply(tid, getPid(button), topicName, username + ' '); + composer.newReply(tid, getPid(button), topicName, username ? username + ' ' : ''); } }