chore: Check assignee exists or not before rendering the assignee avatar (#7104)

This commit is contained in:
Muhsin Keloth
2023-05-17 15:41:23 +05:30
committed by GitHub
parent 49ef4e54ca
commit 6382707146

View File

@@ -37,7 +37,7 @@
</div> </div>
<div> <div>
<thumbnail <thumbnail
v-if="notificationItem.primary_actor.meta.assignee" v-if="hasAssignee(notificationItem)"
:src="notificationItem.primary_actor.meta.assignee.thumbnail" :src="notificationItem.primary_actor.meta.assignee.thumbnail"
size="16px" size="16px"
:username="notificationItem.primary_actor.meta.assignee.name" :username="notificationItem.primary_actor.meta.assignee.name"
@@ -127,6 +127,9 @@ export default {
}); });
} }
}, },
hasAssignee(notification) {
return notification.primary_actor.meta?.assignee;
},
}, },
}; };
</script> </script>