check if this._navBar has immediatelyRefresh method
Summary: `Navigator` throws an error if using a custom `NavigationBar` component that does not have a `immediatelyRefresh` method present. Closes https://github.com/facebook/react-native/pull/9438 Differential Revision: D3838928 Pulled By: mkonicek fbshipit-source-id: 74d62ef09e179f457a4b14f8537dfaf0d4697322
This commit is contained in:
parent
6b42d5c952
commit
7b18b2c409
|
@ -495,7 +495,10 @@ var Navigator = React.createClass({
|
|||
transitionQueue: [],
|
||||
}, () => {
|
||||
this._handleSpringUpdate();
|
||||
this._navBar && this._navBar.immediatelyRefresh();
|
||||
var navBar = this._navBar;
|
||||
if (navBar && navBar.immediatelyRefresh) {
|
||||
navBar.immediatelyRefresh();
|
||||
}
|
||||
this._emitDidFocus(this.state.routeStack[this.state.presentedIndex]);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue