Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use local copy of props instead of this.props
  • Loading branch information
teeli committed Jul 6, 2018
commit c1b9b73806ca655fe16fc25a04720c08d172ef54
6 changes: 3 additions & 3 deletions src/extendReactClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export default (Component: Object, defaultStyles: Object, options: Object) => {
if (this.props.styles || hasDefaultstyles) {
const props = Object.assign({}, this.props);

if (this.props.styles) {
styles = this.props.styles;
if (props.styles) {
styles = props.styles;
} else if (hasDefaultstyles) {
styles = defaultStyles;
delete this.props.styles;
delete props.styles;
}

Object.defineProperty(props, 'styles', {
Expand Down