Skip to content

Commit

Permalink
Review fix: Replace a ternary with if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
denvned committed Mar 9, 2016
1 parent 0aa68d1 commit ab93e1a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/container/RelayRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,21 +313,23 @@ class RelayRenderer extends React.Component {
*/
_calculateRenderArgs(): RelayRendererRenderArgs {
const {readyState} = this.state;
return readyState ?
{
if (readyState) {
return {
done: readyState.done,
error: readyState.error,
props: readyState.ready ? this._resolveContainerProps() : null,
retry: this._retry.bind(this),
stale: readyState.stale,
} :
{
};
} else {
return {
done: false,
error: null,
props: null,
retry: this._retry.bind(this),
stale: false,
};
}
}

render(): ?React.Element {
Expand Down

0 comments on commit ab93e1a

Please sign in to comment.