Patch Changes
-
c0335cf: Fix the
astish
shared function when usingconfig.syntax: 'template-literal'
ex: css
${someVar}
if a value is unresolvable in the static analysis step, it would be interpreted as
undefined
, andastish
would
throw:TypeError: Cannot read properties of undefined (reading 'replace')
-
762fd0c: Fix issue where the
walkObject
shared helper would set an object key to a nullish valueExample:
const shorthands = { flexDir: 'flexDirection', } const obj = { flexDir: 'row', flexDirection: undefined, } const result = walkObject(obj, (value) => value, { getKey(prop) { return shorthands[prop] ?? prop }, })
This would set the
flexDirection
torow
(usinggetKey
) and then set theflexDirection
property again, this
time toundefined
, since it existed in the original object