Skip to content

fix bug in _roundStars method#221

Open
aslanator wants to merge 2 commits intowbotelhos:mainfrom
aslanator:master
Open

fix bug in _roundStars method#221
aslanator wants to merge 2 commits intowbotelhos:mainfrom
aslanator:master

Conversation

@aslanator
Copy link
Copy Markdown

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.


_roundStars: function(score, evt) {
if(Number.isInteger(score))
score += 0.0001;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants