mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 04:47:08 +08:00
Fix error when rendering deleted user
This commit is contained in:
parent
360b503357
commit
67ffd8efd7
@ -63,8 +63,10 @@ export default function mentionedByList() {
|
||||
// replied twice, they will only be in this array once.
|
||||
var used = [];
|
||||
var repliers = replies.filter(reply => {
|
||||
if (used.indexOf(reply.user().id()) === -1) {
|
||||
used.push(reply.user().id());
|
||||
var user = reply.user();
|
||||
var id = user && user.id();
|
||||
if (used.indexOf(id) === -1) {
|
||||
used.push(id);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -79,7 +81,7 @@ export default function mentionedByList() {
|
||||
onclick: hidePreview,
|
||||
'data-number': reply.number()
|
||||
}, [
|
||||
reply.user() === app.session.user() ? 'You' : username(reply.user())
|
||||
app.session.user() && reply.user() === app.session.user() ? 'You' : username(reply.user())
|
||||
])
|
||||
})),
|
||||
' replied to this.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user