Skip to content

Commit

Permalink
style: remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Nov 30, 2018
1 parent 5e787d4 commit 0d96a9f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/extendReactClass.js
Expand Up @@ -18,9 +18,9 @@ export default (Component: Object, defaultStyles: Object, options: Object) => {
let styles;

const hasDefaultstyles = _.isObject(defaultStyles);

let renderResult;

if (this.props.styles || hasDefaultstyles) {
const props = Object.assign({}, this.props);

Expand All @@ -37,28 +37,28 @@ export default (Component: Object, defaultStyles: Object, options: Object) => {
value: styles,
writable: false
});

const originalProps = this.props;

let renderIsSuccessful = false;

try {
this.props = props;

renderResult = super.render();

renderIsSuccessful = true;
} finally {
this.props = originalProps;
}

// @see https://github.com/facebook/react/issues/14224
if (!renderIsSuccessful) {
renderResult = super.render();
}
} else {
styles = {};

renderResult = super.render();
}

Expand Down

0 comments on commit 0d96a9f

Please sign in to comment.