Skip to content

Commit

Permalink
Merge pull request #4613 from Expensify/stites-preventUndefinedErrorI…
Browse files Browse the repository at this point in the history
…nText

Check for value before checking length

(cherry picked from commit 89f0630)
  • Loading branch information
francoisl authored and OSBotify committed Aug 12, 2021
1 parent 3f548ad commit ac7286d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ExpensiTextInput/BaseExpensiTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BaseExpensiTextInput extends Component {
constructor(props) {
super(props);

const hasValue = props.value.length > 0;
const hasValue = props.value && props.value.length > 0;

this.state = {
isFocused: false,
Expand Down

0 comments on commit ac7286d

Please sign in to comment.