Skip to content

Commit da83f51

Browse files
teeligajus
authored andcommitted
fix: use local copy of props instead of this.props (gajus#284)
1 parent c4971f0 commit da83f51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/extendReactClass.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export default (Component: Object, defaultStyles: Object, options: Object) => {
2222
if (this.props.styles || hasDefaultstyles) {
2323
const props = Object.assign({}, this.props);
2424

25-
if (this.props.styles) {
26-
styles = this.props.styles;
25+
if (props.styles) {
26+
styles = props.styles;
2727
} else if (hasDefaultstyles) {
2828
styles = defaultStyles;
29-
delete this.props.styles;
29+
delete props.styles;
3030
}
3131

3232
Object.defineProperty(props, 'styles', {

0 commit comments

Comments
 (0)