From e86f0e43c2742eaa0e0312bb90fedcd708d37fa3 Mon Sep 17 00:00:00 2001 From: Greateck Date: Wed, 6 Feb 2019 01:53:30 +0200 Subject: [PATCH] Fix issue with voting due to deprecation of report.id value and use of report.post_id by Steem nodes --- components/Report.vue | 2 +- components/VoteModal.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/Report.vue b/components/Report.vue index b9bbfc7c..6710cd2d 100644 --- a/components/Report.vue +++ b/components/Report.vue @@ -191,7 +191,7 @@ userVotedThisPost() { let curUser = this.user.account.name; //check if the post contains in its original voters current user, or if it has been upvoted in current session - this.postUpvoted = this.report.active_votes.filter(voter => (voter.voter === curUser)).length > 0 || this.newlyVotedPosts.indexOf(this.report.id)!==-1; + this.postUpvoted = this.report.active_votes.filter(voter => (voter.voter === curUser)).length > 0 || this.newlyVotedPosts.indexOf(this.report.post_id)!==-1; return this.postUpvoted; }, /* function handles confirming if the user had voted already to prevent issues */ diff --git a/components/VoteModal.vue b/components/VoteModal.vue index e6887b46..f57d2605 100644 --- a/components/VoteModal.vue +++ b/components/VoteModal.vue @@ -87,8 +87,8 @@ } else { //append this entry into the list of voted posts - if (this.newlyVotedPosts.indexOf(this.postToVote.id) === -1){ - this.newlyVotedPosts.push(this.postToVote.id); + if (this.newlyVotedPosts.indexOf(this.postToVote.post_id) === -1){ + this.newlyVotedPosts.push(this.postToVote.post_id); } this.$store.commit('setNewlyVotedPosts', this.newlyVotedPosts); $(this.$refs.voteModal).modal('hide')