Skip to content

Commit

Permalink
Merge pull request #6936 from mananjadhav/fix/android-logout
Browse files Browse the repository at this point in the history
[No QA] fix: null check for app state subscription added
  • Loading branch information
Amal Nazeem authored Dec 29, 2021
2 parents 9585da9 + 3f4d30e commit b930390
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/AppStateMonitor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function addBecameActiveListener(callback) {
}
const appStateChangeSubscription = AppState.addEventListener('change', appStateChangeCallback);
return () => {
if (!appStateChangeSubscription) {
return;
}
appStateChangeSubscription.remove();
};
}
Expand Down

0 comments on commit b930390

Please sign in to comment.