mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-25 12:05:52 +08:00
fix: return false for canGoBack if navigator hasn't finished mounting
This commit is contained in:
@@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user