When processing at-rules, postcss-functions expect the node to have a "params" entry but not all at-rules have params. So node.params can be undefined and cause an error when passed to postcss-value-parser.
|
export function transformAtRule(node, functions) { |
|
return then(transformString(node.params, functions), value => { |
|
node.params = value; |
|
}); |
|
} |
The transformString() function should check if a proper string is supplied and fallback to an empty string or avoid parsing if not.
I never had any troubles with PostCSS and font-face rules before. I only notice this bug after a recent update. Apparently my occurrence of the bug is triggered by postcss-font-magician which inject its own at-rules with no params entry (which is not a bug).
When processing at-rules,
postcss-functionsexpect the node to have a "params" entry but not all at-rules have params. Sonode.paramscan be undefined and cause an error when passed topostcss-value-parser.postcss-functions/src/lib/transformer.mjs
Lines 65 to 69 in d834e0a
The
transformString()function should check if a proper string is supplied and fallback to an empty string or avoid parsing if not.I never had any troubles with PostCSS and font-face rules before. I only notice this bug after a recent update. Apparently my occurrence of the bug is triggered by
postcss-font-magicianwhich inject its own at-rules with noparamsentry (which is not a bug).