diff --git a/src/components/CommunityComponents/CommunityHeader.vue b/src/components/CommunityComponents/CommunityHeader.vue index 7fa4ed118326044995dcf63b771b46cc0ba6ea30..f6b7797b472972121b7fe69e97e75f1e1b1c8620 100644 --- a/src/components/CommunityComponents/CommunityHeader.vue +++ b/src/components/CommunityComponents/CommunityHeader.vue @@ -123,11 +123,13 @@ export default { this.community = await CommunityService.getCommunity( this.$route.params.communityID ); - let members = await CommunityService.getCommunityMembers( + const members = await CommunityService.getCommunityMembers( this.$route.params.communityID ); - for (let mem in members) { - if (mem === this.userid) { + for (let i = 0; i < members.length; i++) { + console.log(members[i].userId + " vs " + this.userid); + console.log(members[i].userId == this.userid); + if (members[i].userId == this.userid) { this.member = true; return; }