Skip to content

Commit

Permalink
[react-native] In TouchableOpacity, access .props on element, not com…
Browse files Browse the repository at this point in the history
…ponent
  • Loading branch information
sophiebits committed May 8, 2015
1 parent ec9015d commit 5e51fac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Libraries/Components/Touchable/TouchableOpacity.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ var TouchableOpacity = React.createClass({
},

touchableHandleActivePressOut: function() {
var childStyle = (
this.refs[CHILD_REF].props &&
flattenStyle(this.refs[CHILD_REF].props.style)
) || {};
var child = onlyChild(this.props.children);
var childStyle = flattenStyle(child.props.style) || {};
this.setOpacityTo(childStyle.opacity === undefined ? 1 : childStyle.opacity);
this.props.onPressOut && this.props.onPressOut();
},
Expand Down

0 comments on commit 5e51fac

Please sign in to comment.