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: safe checking if params are present for at rule #871

Merged
merged 3 commits into from Dec 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/plugins/postcss-icss-parser.js
Expand Up @@ -75,8 +75,12 @@ export default postcss.plugin(

// Replace tokens in at-rules
css.walkAtRules((atrule) => {
// eslint-disable-next-line no-param-reassign
atrule.params = replaceImportsInString(atrule.params.toString());
// Due reusing `ast` from `postcss-loader` some plugins may lack
// `params` property, we need to account for this possibility
if (atrule.params) {
// eslint-disable-next-line no-param-reassign
atrule.params = replaceImportsInString(atrule.params.toString());
}
});

// Replace tokens in export
Expand Down