[ReactNative] Fix inspect element crash
This commit is contained in:
parent
474ac651d5
commit
3c1eaf7a6e
|
@ -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}>
|
||||||
|
|
Loading…
Reference in New Issue