fix(loading-screen): do not show empty errorMessage when being null

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2024-03-25 12:34:55 +01:00
parent e3ae6a174f
commit 1fd6e4e1b1

View file

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
@ -26,7 +26,7 @@ export const LoadingScreen: React.FC<LoadingScreenProps> = ({ errorMessage }) =>
<LoadingAnimation error={!!errorMessage} />
</span>
</div>
{errorMessage !== undefined && <Alert variant={'danger'}>{errorMessage}</Alert>}
{errorMessage && <Alert variant={'danger'}>{errorMessage}</Alert>}
</div>
)
}