fix: return false for canGoBack if navigator hasn't finished mounting

This commit is contained in:
Satyajit Sahoo
2020-02-12 21:28:03 +01:00
parent b6accd03f6
commit c8ac5fab61

View File

@@ -207,7 +207,7 @@ const BaseNavigationContainer = React.forwardRef(
const canGoBack = () => {
if (listeners[0] == null) {
throw new Error(NOT_INITIALIZED_ERROR);
return false;
}
const { result, handled } = listeners[0](navigation =>