Skip to content

Commit

Permalink
fix(preset-mini): directionSize size cause error when size is undefin…
Browse files Browse the repository at this point in the history
…ed (#3809)
  • Loading branch information
Simon-He95 committed May 16, 2024
1 parent 398c15a commit c19ab68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-mini/src/_utils/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function directionSize(propertyPrefix: string): DynamicMatcher {
if (v != null) {
return directionMap[direction].map(i => [`${propertyPrefix}${i}`, v])
}
else if (size.startsWith('-')) {
else if (size?.startsWith('-')) {
// --custom-spacing-value
const v = theme.spacing?.[size.slice(1)]
if (v != null)
Expand Down

0 comments on commit c19ab68

Please sign in to comment.