diff --git a/Libraries/Inspector/Inspector.js b/Libraries/Inspector/Inspector.js index d1ee7c93838..0f8276f5bc2 100644 --- a/Libraries/Inspector/Inspector.js +++ b/Libraries/Inspector/Inspector.js @@ -129,7 +129,7 @@ class Inspector extends React.Component { // if we inspect a stateless component we can't use the getPublicInstance method // therefore we use the internal _instance property directly. var publicInstance = instance['_instance'] || {}; - var source = instance._currentElement && instance._currentElement._source; + var source = instance['_currentElement'] && instance['_currentElement']['_source']; UIManager.measure(instance.getNativeNode(), (x, y, width, height, left, top) => { this.setState({ inspected: { @@ -149,9 +149,9 @@ class Inspector extends React.Component { var hierarchy = InspectorUtils.getOwnerHierarchy(instance); // if we inspect a stateless component we can't use the getPublicInstance method // therefore we use the internal _instance property directly. - var publicInstance = instance._instance || {}; + var publicInstance = instance['_instance'] || {}; var props = publicInstance.props || {}; - var source = instance._currentElement && instance._currentElement._source; + var source = instance['_currentElement'] && instance['_currentElement']['_source']; this.setState({ panelPos: pointerY > Dimensions.get('window').height / 2 ? 'top' : 'bottom', selection: hierarchy.length - 1,