[ReactNative] Fix inspect element crash

This commit is contained in:
Christopher Chedeau 2015-05-28 09:58:35 -07:00
parent 474ac651d5
commit 3c1eaf7a6e
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ var InspectorOverlay = React.createClass({
var ElementProperties = React.createClass({ var ElementProperties = React.createClass({
render: function() { render: function() {
var path = this.props.hierarchy.map((instance) => instance.getName()).join(' > '); var path = this.props.hierarchy.map((instance) => {
return instance.getName ? instance.getName() : 'Unknown';
}).join(' > ');
return ( return (
<View style={styles.info}> <View style={styles.info}>
<Text style={styles.path}> <Text style={styles.path}>