Skip to content

Commit

Permalink
#537 | Catch and hide back button handler failures, and pass it on to…
Browse files Browse the repository at this point in the history
… the default handler

This might fix errors showing up on Bugsnag. Essentially, this is a problem with the module for which the best way to fix is to upgrade to newer RN versions. See facebookarchive/react-native-custom-components#33 for more details.
  • Loading branch information
vinayvenu committed Nov 12, 2021
1 parent 579d55a commit 56185e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/openchs-android/src/framework/routing/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ export default class Router extends Component {
return element.onHardwareBackPress();
}
if (!this.onInitialScreen) {
this.navigator.pop();
try {
this.navigator.pop();
}catch (e) {
General.logErrorAsInfo("Router", e);
return false;
}
return true;
}
return false;
Expand Down

0 comments on commit 56185e8

Please sign in to comment.