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

Avoid resolving promise with undefined; always throwing not found error. #2

Closed
wants to merge 1 commit into from

Conversation

chriszarate
Copy link

The core promise can resolve to undefined since there is no fallback return / throw statement.

In the (very common) scenario where the import file is (1) correctly formed (ends with .css, etc.) but (2) does not exist, the promise will resolve to undefined instead of rejecting. This is especially problematic when walking through an array of possible paths where the import might be located, as in postcss-advanced-variables's importPaths directive:

https://github.com/jonathantneal/postcss-advanced-variables#importpaths

@chriszarate
Copy link
Author

Project abandoned, no longer using this

@chriszarate chriszarate closed this Apr 2, 2022
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.

None yet

1 participant