mirror of
https://github.com/flarum/core.git
synced 2025-08-07 00:47:00 +02:00
Fix error when replying to a post by a deleted user
This commit is contained in:
@@ -10,7 +10,8 @@ export default function() {
|
||||
if (post.isHidden() || (app.session.user && !post.discussion().canReply())) return;
|
||||
|
||||
function insertMention(component, quote) {
|
||||
const mention = '@' + post.user().username() + '#' + post.id() + ' ';
|
||||
const user = post.user();
|
||||
const mention = '@' + (user ? user.username() : post.number()) + '#' + post.id() + ' ';
|
||||
|
||||
// If the composer is empty, then assume we're starting a new reply.
|
||||
// In which case we don't want the user to have to confirm if they
|
||||
|
Reference in New Issue
Block a user