Skip to content

Commit

Permalink
Fix issue with voting due to deprecation of report.id value and use o…
Browse files Browse the repository at this point in the history
…f report.post_id by Steem nodes
  • Loading branch information
Greateck committed Feb 5, 2019
1 parent 48dc03d commit e86f0e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/Report.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions components/VoteModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e86f0e4

Please sign in to comment.