Skip to content

Commit 606d62a

Browse files
authored
Merge pull request #7 from RetiredWorld/master
Fix deleted user crash the discussion page
2 parents 25e0881 + fc2dfab commit 606d62a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

js/src/forum/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ app.initializers.add('dem13n-topic-starter-label', () => {
2121

2222
const labelText = (routeName === 'blogArticle') ? app.translator.trans('dem13n.forum.blog_article_author') : app.translator.trans('dem13n.forum.topic_starter');
2323
const post = this.attrs.post;
24+
25+
if (!post.user().id) return;
26+
2427
const postAuthor = post.user().id();
28+
29+
if (!post.discussion().user().id) return;
30+
2531
const discussionAuthor = post.discussion().user().id();
2632

2733
if (!discussionAuthor && !postAuthor) {

0 commit comments

Comments
 (0)