Skip to content

Commit

Permalink
fix: handle empty text
Browse files Browse the repository at this point in the history
  • Loading branch information
lohenyumnam committed Jan 27, 2023
1 parent 41d9724 commit 8a64f53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/component/truncated_text_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export const TruncatedTextView = (props: Props) => {
});
}, [_shouldShowTailViewAndroid, _shouldShowTailViewIOS, numberOfLines]);

// this will hide the text view if the text is empty
if (!fullText) return <View />;

return (
<View style={[styles.container, containerStyle]}>
<Pressable
Expand Down

0 comments on commit 8a64f53

Please sign in to comment.