From 9b10d1d4ea21d660ae6acc0db565f25e27494224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maren=20S=C3=BCwer?= Date: Mon, 29 Oct 2018 13:56:16 +0100 Subject: [PATCH] check if description exists before using it --- .../src/repos/sources/containers/Content.js | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/scm-ui/src/repos/sources/containers/Content.js b/scm-ui/src/repos/sources/containers/Content.js index a9f2e46df9..4a91e57cf2 100644 --- a/scm-ui/src/repos/sources/containers/Content.js +++ b/scm-ui/src/repos/sources/containers/Content.js @@ -77,23 +77,24 @@ class Content extends React.Component { showHeader() { const { file } = this.props; const date = ; + const description = file.description ? ( +

+ {file.description.split("\n").map((item, key) => { + return ( + + {item} +
+
+ ); + })} +

+ ) : null; return (

{file.name}

-
-

- {file.description.split("\n").map((item, key) => { - return ( - - {item} -
-
- ); - })} -

-
+
{description}
{date}