Skip to content

Commit

Permalink
DEV: reverted topContributors if statement and revert from .at to []
Browse files Browse the repository at this point in the history
  • Loading branch information
Grubba27 committed Jul 11, 2024
1 parent 7c68cea commit 4aa7f5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion javascripts/discourse/components/blocks/top-contributors.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ export default class BlockTopContributors extends Component {
href={{concat "/u/" topContributor.username}}
data-user-card={{topContributor.username}}
>
{{htmlSafe topContributor.username}}
{{#if topContributor.name}}
{{topContributor.name}}
{{else}}
{{htmlSafe topContributor.username}}
{{/if}}
</a>
</div>
<div class="block-chart__details">
Expand Down
2 changes: 1 addition & 1 deletion javascripts/discourse/components/blocks/top-topics.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class BlockTopTopics extends Component {
(category) => topic.category_id === category.id
);
topic.author = data.users.find(
(user) => user.id === topic.posters.at(0).user_id
(user) => user.id === topic.posters[0].user_id
);
return topic;
});
Expand Down

0 comments on commit 4aa7f5f

Please sign in to comment.