We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aae6e42 commit e395271Copy full SHA for e395271
src/components/FAB/AnimatedFAB.tsx
@@ -335,8 +335,8 @@ const AnimatedFAB = ({
335
const onTextLayout = ({
336
nativeEvent,
337
}: NativeSyntheticEvent<TextLayoutEventData>) => {
338
- const currentWidth = Math.ceil(nativeEvent.lines[0].width);
339
- 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);
340
341
if (currentWidth !== textWidth || currentHeight !== textHeight) {
342
setTextHeight(currentHeight);
0 commit comments