From c6b7e87d68af98d38654b35d255c1550531a8c0a Mon Sep 17 00:00:00 2001 From: Luiz Baldi Date: Tue, 22 Dec 2020 09:51:26 -0300 Subject: [PATCH] fix: android crash when rendering a ScrollView component --- src/Button/Button.tsx | 16 ++++++++++------ src/ScrollView/ScrollView.tsx | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Button/Button.tsx b/src/Button/Button.tsx index 7fcbdd1..da663a8 100644 --- a/src/Button/Button.tsx +++ b/src/Button/Button.tsx @@ -98,9 +98,13 @@ const Button = ({ accessibilityLabel={accessibilityLabel} > - - {children} - + {typeof children === 'string' ? ( + + {children} + + ) : ( + children + )} @@ -174,11 +178,11 @@ const Borders = ({ style, ]} > - {outer && ( + {Array.isArray(outer) && ( - {inner && inner.length > 0 && ( + {Array.isArray(inner) && inner.length > 0 && ( - {focus && !active && ( + {Array.isArray(focus) && !active && (