Skip to content

Commit 3729384

Browse files
add rn border style building safety
1 parent 45d4c2d commit 3729384

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/builder-react-native/rn-styles

packages/builder-react-native/rn-styles/border.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export function border(p: Border, rad: BorderRadius): ViewStyle {
3030
};
3131

3232
// if colors are all same
33-
if (equals(p.top?.color, p.right?.color, p.bottom?.color, p.left?.color)) {
33+
if (
34+
p.top?.color && // not undefined
35+
equals(p.top?.color, p.right?.color, p.bottom?.color, p.left?.color)
36+
) {
3437
o = {
3538
...o,
3639
borderColor: css.color(p.top.color),

0 commit comments

Comments
 (0)