Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in _roundStars method #221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

aslanator
Copy link

Fix bug, when score is integer .
Math.ceil(score) - 1 make 2 from 3 and so on.
If we add 0.0001 to scroe if it integer will solve the problem.

@@ -481,6 +481,8 @@
},

_roundStars: function(score, evt) {
if(Number.isInteger(score))
score += 0.0001;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected '{' and instead saw 'score'.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve it

@aslanator
Copy link
Author

I 'am not sure, but i think that error "TypeError: star is undefined thrown" already in the project, before my commit, becouse when i was checkout to previous commit, i have same error.

fix code style
@wbotelhos
Copy link
Owner

Hi @aslanator ,

Could you write a test for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants