diff --git a/src/components/FAB/AnimatedFAB.tsx b/src/components/FAB/AnimatedFAB.tsx index 4cd05fda1d..540f80676f 100644 --- a/src/components/FAB/AnimatedFAB.tsx +++ b/src/components/FAB/AnimatedFAB.tsx @@ -328,8 +328,8 @@ const AnimatedFAB = ({ const onTextLayout = ({ nativeEvent, }: NativeSyntheticEvent) => { - const currentWidth = Math.ceil(nativeEvent.lines[0].width); - const currentHeight = Math.ceil(nativeEvent.lines[0].height); + const currentWidth = Math.ceil(nativeEvent.lines[0]?.width ?? 0); + const currentHeight = Math.ceil(nativeEvent.lines[0]?.height ?? 0); if (currentWidth !== textWidth || currentHeight !== textHeight) { setTextHeight(currentHeight);