From 67a4d3acc14c280ffba00f2a5dc7894f0d941f67 Mon Sep 17 00:00:00 2001 From: Aslanator Date: Thu, 4 Apr 2019 14:46:53 +0400 Subject: [PATCH 1/2] fix bug in _roundStars method --- lib/jquery.raty.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/jquery.raty.js b/lib/jquery.raty.js index 103a9350..64e5c919 100644 --- a/lib/jquery.raty.js +++ b/lib/jquery.raty.js @@ -481,6 +481,8 @@ }, _roundStars: function(score, evt) { + if(Number.isInteger(score)) + score += 0.0001; var decimal = (score % 1).toFixed(2), name ; From ff8e6e130002879c7878a4e866322d398a5ec397 Mon Sep 17 00:00:00 2001 From: Aslanator <30744567+aslanator@users.noreply.github.com> Date: Thu, 4 Apr 2019 20:16:59 +0300 Subject: [PATCH 2/2] Update jquery.raty.js fix code style --- lib/jquery.raty.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/jquery.raty.js b/lib/jquery.raty.js index 64e5c919..4785e9ad 100644 --- a/lib/jquery.raty.js +++ b/lib/jquery.raty.js @@ -481,8 +481,10 @@ }, _roundStars: function(score, evt) { - if(Number.isInteger(score)) + if(Number.isInteger(score)){ score += 0.0001; + } + var decimal = (score % 1).toFixed(2), name ;