diff --git a/src/pages/iou/steps/IOUAmountPage.js b/src/pages/iou/steps/IOUAmountPage.js index b1b671e850aa..1bb9540d0573 100755 --- a/src/pages/iou/steps/IOUAmountPage.js +++ b/src/pages/iou/steps/IOUAmountPage.js @@ -88,7 +88,7 @@ class IOUAmountPage extends React.Component { componentDidMount() { this.focusTextInput(); - this.unsubscribeAppStateSubscription = AppState.addEventListener( + this.appStateSubscription = AppState.addEventListener( 'change', this.dismissKeyboardWhenBackgrounded, ); @@ -103,10 +103,10 @@ class IOUAmountPage extends React.Component { } componentWillUnmount() { - if (!this.unsubscribeAppStateSubscription) { + if (!this.appStateSubscription) { return; } - this.unsubscribeAppStateSubscription(); + this.appStateSubscription.remove(); } dismissKeyboardWhenBackgrounded(nextAppState) {