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

Throwing error if input is not a string #31

Open
amaschas opened this issue Jun 27, 2016 · 6 comments
Open

Throwing error if input is not a string #31

amaschas opened this issue Jun 27, 2016 · 6 comments

Comments

@amaschas
Copy link

There appear to be some valid cases where the input to the parser is not a string. For instance, svg-load function from postcss-inline-svg results in a value.charCodeAt is not a function error.

This appears to be related: #30

@TrySound
Copy link
Owner

@amaschas Would you like to send a PR? :)

@amaschas
Copy link
Author

I could try! I'm actually not 100% sure what the expected behavior is in this case. I encountered this trying to use postcss-inline-svg in webpack, (which I believe you also maintain), with svgo and postcss-assets and kept getting this same error, both of which have a dependency on postcss-value-parser. I'm having a hard time wrapping my head around how everything interrelates, since I'm rather new to using postcss.

@TrySound
Copy link
Owner

@amaschas There was an issue with postcss-inline-svg@2 some time ago. Did you tried fixed 2.0.1?

@TrySound
Copy link
Owner

TrySound commented Jun 27, 2016

PR may contain just if statement with more convinient error. With test case of cause:)

@amaschas
Copy link
Author

Sure, I'll find some time to do that this week.

Updating to 2.0.1 did in fact fix my issue. Thank you!

@TrySound
Copy link
Owner

Glad to hear :)

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

No branches or pull requests

2 participants