Skip to content

Conversation

@CAYdenberg
Copy link
Contributor

Realistically the problem is that if isRGB gets anything other than an array or string, it treats it as an object, and trying to access properties (c.r) on null throws an error.

I shied away from really checking the type; it's possible to pass numbers, etc.. as well as arrays or objects of the wrong shape - execution stays alive but the user might get weird results. It's only null and undefined where a fatal error will occur and it's nice to give the user an indication of why.

@onury onury merged commit d2fecf8 into onury:master Apr 5, 2018
@onury
Copy link
Owner

onury commented Apr 5, 2018

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants