-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add undefined
check
#154
Comments
I think maybe we can just do: - if (options === null || options === undefined || Object.keys(options).length === 0)
+ if (!options || Object.keys(options).length === 0) |
Would love to but .postcssrc.js module.exports = ({ options, env }) => {
plugins: {
// Check for options.plugin === 'undefined',
// but load the plugin with defaults (the current bug)
'postcss-plugin': options.plugin
// if env === 'development' don't load the plugin
'cssnano': env === 'production' ? null : false
}
} |
Ok, that make sense then. |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details
Check for
undefined
in the plugin loader (postcss-load-plugins #67)Its being tested only if the options
{Object}
isnull
, if the{Object}
is notnull
it tries tolook at the keys of the
{Object}
, but I believe that its being forgotten the case when the options{Object}
isundefined
Error (Logs|Stacks)
postcss.config.js
Reproduction (Code)
Environment
The text was updated successfully, but these errors were encountered: