Fix dislike count increasing in Firefox.

likeClicked() suppose to decrease the dislike count by 1 if the
previous state is "disliked", but the function is empty on Firefox.
This commit is contained in:
surrealegg committed 2021-12-05 22:15:07 +04:00
1 parent d1d0dbf36a
commit 386b357049
1 file changed
+7 -1
@@ -116,7 +116,13 @@ function setState() {
);
}
function likeClicked() {}
function likeClicked() {
if (storedData.previousState === 'disliked') {
storedData.dislikes--;
setDislikes(numberFormat(storedData.dislikes));
storedData.previousState = 'liked';
}
}
function dislikeClicked() {
let state = getState().current;