SteemPlus icon indicating copy to clipboard operation
SteemPlus copied to clipboard

[steemit.com] Posts on Feed shows undefined in place of vote count

Open ng-gist opened this issue 6 years ago • 0 comments

Expected behavior

On steemit.com platform, Posts on feed should show vote counts.

Actual behavior

On steemit.com platform, SteemPlus Feed shows undefined for vote count.

How to reproduce

  1. Install and enable latest SteemPlus extension.
  2. Go to steemit.com and click on Feed from Top (Next to Promoted.)
  3. Notice undefined next to up carrot

image

Technical Analysis

feedplus.js line 167

list_posts.push(Posts(window.SteemPlus.Sanitize.postBodyShort(elt.body), elt.title, elt.hasOwnProperty("first_reblogged_by") ? elt.first_reblogged_by : '', elt.created, elt.pending_payout_value, 0, elt.net_votes, elt.author, JSON.parse(elt.json_metadata).hasOwnProperty("tags") ? JSON.parse(elt.json_metadata).tags : [elt.category], urlImage, elt.url, voted));

Change net_votes to active_votes.length

list_posts.push(Posts(window.SteemPlus.Sanitize.postBodyShort(elt.body), elt.title, elt.hasOwnProperty("first_reblogged_by") ? elt.first_reblogged_by : '', elt.created, elt.pending_payout_value, 0, elt.active_votes.length, elt.author, JSON.parse(elt.json_metadata).hasOwnProperty("tags") ? JSON.parse(elt.json_metadata).tags : [elt.category], urlImage, elt.url, voted));
  • Browser: Chrome Version 69.0.3497.100 (Official Build) (64-bit)
  • Operating system: OSX 10.11.6
  • SteemPlus Version: 3.5.4.1

ng-gist avatar Dec 21 '18 02:12 ng-gist