Skip to content

Commit 096b35d

Browse files
committed
Use better syntax
1 parent 3bd1cd8 commit 096b35d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/lib/spacing.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,22 @@ export function spacing(
8585
...(() => {
8686
const { rightLeft } = params;
8787

88-
return rightLeft === undefined
89-
? undefined
90-
: {
91-
"right": rightLeft,
92-
"left": rightLeft
93-
};
88+
return (
89+
rightLeft !== undefined && {
90+
"right": rightLeft,
91+
"left": rightLeft
92+
}
93+
);
9494
})(),
9595
...(() => {
9696
const { topBottom } = params;
9797

98-
return topBottom === undefined
99-
? undefined
100-
: {
101-
"top": topBottom,
102-
"bottom": topBottom
103-
};
98+
return (
99+
topBottom !== undefined && {
100+
"top": topBottom,
101+
"bottom": topBottom
102+
}
103+
);
104104
})(),
105105
...(params.top !== undefined && { "top": params.top }),
106106
...(params.right !== undefined && { "right": params.right }),

0 commit comments

Comments
 (0)