Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.
Small bug in voting.js

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
to
refer to v1.1.1b
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
1
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
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.