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

Replaced abuse of the logical or operator #26

Merged
merged 3 commits into from Jun 3, 2016
Merged

Conversation

Azeirah
Copy link
Contributor

@Azeirah Azeirah commented Jun 3, 2016

Statements like

function someFunc(x) {
    x = x || 1;
    return x;
}

Can fail unexpectedly, as for example 0 is falsy, someFunc(0) returns 1.

I was playing around with spectra, diminishing alpha values over time.. When alpha reached 0, alpha was suddenly 1, fully opaque!

var c = Spectra({r: 0, g: 0, b: 0, a: 0}).rgbaString()

Should be rgba(0, 0, 0, 0), but is rgba(0, 0, 0, 1) instead!

This has been fixed in this pull request.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.259% when pulling bf449ca on Azeirah:master into 13fa41d on avp:master.

@avp avp merged commit c124f8f into avp:master Jun 3, 2016
@Azeirah
Copy link
Contributor Author

Azeirah commented Jun 4, 2016

Thanks for taking the time to merging this request, not all package maintainers take the time to manage their projects after development has stalled.

@avp avp removed the in progress label Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants