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

Add tests to avoid division by zero #665

Merged
merged 2 commits into from Apr 5, 2018

Conversation

Projects
None yet
3 participants
@Porkepix
Contributor

Porkepix commented Apr 5, 2018

In L10nStatusOverview tables, consider result is 100% when divisor is 0.
Also regularized indentation inside one of the for loop.

--

We could also consider result should be 0, matter of choice.

Add tests to avoid division by zero
In L10nStatusOverview tables, consider result is 100% when divisor is 0.
Also regularized indentation inside one of the for loop.
@Porkepix

This comment has been minimized.

Contributor

Porkepix commented Apr 5, 2018

@Elchi3

This comment has been minimized.

Member

Elchi3 commented Apr 5, 2018

I think 0 might make more sense. I will let Julien make the call and review this :)

@Elchi3 Elchi3 requested a review from SphinxKnight Apr 5, 2018

Fixing default and rearranging var scope
Switching from 100 to 0% as a default value.
Also, using var twice for the same variable inside a function is not a good practice.
@SphinxKnight

I've modified some minor stuff and switched from 100% to 0% as a default value for this edge case.

@SphinxKnight

This comment has been minimized.

Collaborator

SphinxKnight commented Apr 5, 2018

@Porkepix FWIW, the "original" issue with the doc status page was a missing "Index" here creating it fixed the content.

@SphinxKnight SphinxKnight merged commit f227115 into mdn:master Apr 5, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Porkepix Porkepix deleted the Porkepix:L10nStatusOverview-NaN-fix branch Sep 5, 2018

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