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 for incorrect color parsing for certain strings. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Me1000
Copy link

@Me1000 Me1000 commented Jul 10, 2019

The color-parser looks up color names in an object that inherits from the object prototype, this causes lookups like color["constructor"] to return a function, which then causes the parser to return the malformed color {r: undefined, g: undefined, b: undefined }.

This PR fixes that issue.

Fixes #7.

@Me1000 Me1000 changed the title Fix for incorrect color parsing for certain strings. Fixes #7 Fix for incorrect color parsing for certain strings. Jul 10, 2019
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.

parse("constructor") returns {r:undefined,g:undefined,c:undefined}
1 participant