mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Show "no owner" when challenge leader cannot be found
Fixes #11768 - Check if `challenge.leader` is `null` before trying to display the user's name after "Created By:" - Check the `challenge.leader` isn't `null` before trying to get its `id` for comparison when determining if the current user `canDelete` or `canEdit`
This commit is contained in:
@@ -18,7 +18,10 @@
|
||||
<div>
|
||||
<span class="mr-1 ml-0 d-block">
|
||||
<strong v-once>{{ $t('createdBy') }}:</strong>
|
||||
<user-link
|
||||
<span v-if="challenge.leader === null">
|
||||
{{ $t('noChallengeOwner') }}
|
||||
</span>
|
||||
<user-link v-else
|
||||
class="mx-1"
|
||||
:user="challenge.leader"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user