aboutsummaryrefslogtreecommitdiff
path: root/vnext
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-28 12:11:21 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit4a0583e6e6737fefb2f39bf6ed0f37be4524a8b5 (patch)
treea95188af729078e1d2d19c158e4f4bd9dfcf73ef /vnext
parentc6fd95c44d672a9ec358a312d03cf061f8cf7704 (diff)
empty recommendations fix
Diffstat (limited to 'vnext')
-rw-r--r--vnext/src/components/Thread.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js
index 9ef5c5b9..e0b25bf9 100644
--- a/vnext/src/components/Thread.js
+++ b/vnext/src/components/Thread.js
@@ -162,12 +162,12 @@ export default class Thread extends React.Component {
function Recommendations(props) {
const recomms = props.src;
- return recomms && (
+ return recomms && recomms.length > 0 && (
<div className="msg-recomms">{`Recommended by (${recomms.length}): `}
{
recomms.map(it => (
<Link key={it} to={`/${it}/`}>{it}</Link>
- )).reduce((prev, curr) => [prev, ', ', curr])
+ )).reduce((prev, curr) => [prev, ', ', curr], 0)
}
</div>
) || null;