Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
Fixed minor mistakes
Browse files Browse the repository at this point in the history
Upon reaching zero likes, count was not returning to "Like" on click due to conditional (should not have been integer). Removed var — variable had already been defined.
  • Loading branch information
JonMasterson committed Jul 27, 2014
1 parent 47a5ca2 commit 576f1aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions post-like.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jQuery(document).ready(function() {
if( count.indexOf( "already" ) !== -1 )
{
var lecount = count.replace("already","");
if (lecount == 0)
if (lecount === "0")
{
var lecount = "Like";
lecount = "Like";
}
heart.prop('title', 'Like');
heart.removeClass("liked");
Expand Down

0 comments on commit 576f1aa

Please sign in to comment.