Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Small bug in voting.js

nukboonnukboon New
edited November 2011 in Vanilla 2.0 - 2.8
When the follower equal 1 and if this follower is you and when you click for cancel your follow, server will return -1
i have changed line no. 85 to fix it

count = json.State ? ++count : --count;
to
count = json.State ? ++count : (count ? --count : 0);

refer to v1.1.1b
matt

Comments

  • My vote.js already uses:
    count = json.State ? ++count : (count ? --count : 0);

    But clicking follow changes count to -1 then -2 if clicked again and -3 and onward.

    Strange

  • @hydn said:
    My vote.js already uses:
    count = json.State ? ++count : (count ? --count : 0);

    But clicking follow changes count to -1 then -2 if clicked again and -3 and onward.

    Strange

    Same here. When I click Follow from the main page it goes -1. If I keep clicking before a refresh it will go -2 -3 -4 and so on.

    Once I refresh it goes to either 0 or 1 depending on how many times I clicked. So it's working (ie it's saving that bookmark) but it's just not displaying correctly.

    hydn
Sign In or Register to comment.