Skip to content

Commit

Permalink
additional
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 5, 2024
1 parent 97a2254 commit f6d38d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/src/forum/components/SelectBestAnswerItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export default class SelectBestAnswerItem extends Component {
}

getSetTime(discussion) {
if (discussion.bestAnswerSetAt() === null) {
if (discussion.bestAnswerSetAt?.() === null|undefined) {
return;
}
return humanTime(discussion.bestAnswerSetAt());
return humanTime(discussion.bestAnswerSetAt?.());
}

items() {
Expand All @@ -50,7 +50,7 @@ export default class SelectBestAnswerItem extends Component {
{app.translator.trans('fof-best-answer.forum.best_answer_label', {
user: this.discussion.bestAnswerUser?.(),
time_set: this.getSetTime(this.discussion),
a: <a onclick={() => m.route.set(app.route.user(this.discussion.bestAnswerUser()))} />,
a: <a onclick={() => m.route.set(app.route.user(this.discussion.bestAnswerUser?.()))} />,
})}
</span>
);
Expand Down

0 comments on commit f6d38d1

Please sign in to comment.