Skip to content

Commit

Permalink
fix: crash when textCharStyle is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommezz committed Jan 23, 2023
1 parent 7ddd6f5 commit 60db7f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/StopwatchTimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ function Stopwatch(
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { width, ...textCharStyleWithoutWidth } =
StyleSheet.flatten(textCharStyle);
const { width, ...textCharStyleWithoutWidth } = StyleSheet.flatten(
textCharStyle || {}
);

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

0 comments on commit 60db7f4

Please sign in to comment.