Skip to content
This repository was archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
[Consignment] Check if optional functions exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Apr 9, 2019
1 parent a8835b8 commit 12fc9f9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/lib/Components/Consignments/Components/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,18 @@ export default class TextInputField extends React.Component<TextInputProps, Stat
placeholderTextColor={this.state.focused ? "white" : Colors.GraySemibold}
selectionColor={Colors.GrayMedium}
{...this.props.text}
onFocus={e => this.setState({ focused: true }, () => this.props.text.onFocus(e))}
onBlur={e => this.setState({ focused: false }, () => this.props.text.onBlur(e))}
onFocus={e =>
this.setState(
{ focused: true },
() => this.props.text && this.props.text.onFocus && this.props.text.onFocus(e)
)
}
onBlur={e =>
this.setState(
{ focused: false },
() => this.props.text && this.props.text.onBlur && this.props.text.onBlur(e)
)
}
/>
)}

Expand Down

1 comment on commit 12fc9f9

@ashfurrow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking through Sentry this morning when I saw this crash, which is 10 months old but saw an uptick in crash events since we upgraded RN with 5.0.1:

Screen Shot 2019-04-10 at 11 15 09 AM

The crash is fixed by this commit; we should prioritize getting a patch of Eigen out the door with this fix. /cc @orta

Please sign in to comment.