From abd37d141e371a53d9a0c85f03a8e18de17ddb5d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 26 Jun 2018 07:54:38 +0100 Subject: [PATCH] clear up if statement to make it more readable Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RoomSubList.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index bd09241ce0..b02fc7902a 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -389,16 +389,14 @@ const RoomSubList = React.createClass({ : subListContent; } else { const Loader = sdk.getComponent("elements.Spinner"); - if (this.props.showSpinner && !this.state.hidden) { + if (this.props.showSpinner) { content = ; - } else if (this.state.hidden) { - content = undefined; - } // else show content calculated above + } return (
{this.props.alwaysShowHeader ? this._getHeaderJsx() : undefined} - { content } + { this.state.hidden ? undefined : content }
); }