Skip to content

Commit b8dcfbc

Browse files
committed
Fixes error when navigationBar is set back to null
1 parent 30999e3 commit b8dcfbc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Libraries/CustomComponents/Navigator/Navigator.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,10 @@ var Navigator = React.createClass({
10881088
}
10891089
return React.cloneElement(this.props.navigationBar, {
10901090
ref: (navBar) => {
1091-
this.props.navigationBar.ref instanceof Function && this.props.navigationBar.ref(navBar);
1091+
var navigationBar = this.props.navigationBar;
1092+
if (navigationBar && navigationBar.ref instanceof Function) {
1093+
navigationBar.ref(navBar);
1094+
}
10921095
this._navBar = navBar;
10931096
},
10941097
navigator: this._navigationBarNavigator,

0 commit comments

Comments
 (0)