From d9af9986bb9fbe24858dfa0ee4cc391fc3e1f82a Mon Sep 17 00:00:00 2001 From: David Walsh Date: Fri, 16 Oct 2020 20:23:19 -0500 Subject: [PATCH] Make loading screen more concise --- .../ui/loading-screen/loading-screen.component.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/app/components/ui/loading-screen/loading-screen.component.js b/ui/app/components/ui/loading-screen/loading-screen.component.js index e7f754acc..457f2dcbd 100644 --- a/ui/app/components/ui/loading-screen/loading-screen.component.js +++ b/ui/app/components/ui/loading-screen/loading-screen.component.js @@ -16,18 +16,18 @@ class LoadingScreen extends Component { renderMessage () { const { loadingMessage } = this.props - if (isValidElement(loadingMessage)) { - return loadingMessage + + if (!loadingMessage) { + return null } - return loadingMessage - ? {loadingMessage} - : null + + return isValidElement(loadingMessage) ? loadingMessage : {loadingMessage} } render () { return (
- {this.props.header && this.props.header} + {this.props.header}
{this.props.showLoadingSpinner && } {this.renderMessage()}