Skip to content

Commit 3bd1cd8

Browse files
committed
Improve speading syntax
1 parent f1f8951 commit 3bd1cd8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/spacing.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ export function spacing(
102102
"bottom": topBottom
103103
};
104104
})(),
105-
...(params.top === undefined ? undefined : { "top": params.top }),
106-
...(params.right === undefined ? undefined : { "right": params.right }),
107-
...(params.bottom === undefined ? undefined : { "bottom": params.bottom }),
108-
...(params.left === undefined ? undefined : { "left": params.left })
105+
...(params.top !== undefined && { "top": params.top }),
106+
...(params.right !== undefined && { "right": params.right }),
107+
...(params.bottom !== undefined && { "bottom": params.bottom }),
108+
...(params.left !== undefined && { "left": params.left })
109109
};
110110

111111
(["top", "right", "bottom", "left"] as const).forEach(p => {

0 commit comments

Comments
 (0)