From 338850d6908a7ea803d45606932cce1f7b82cfeb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 5 Jul 2018 13:58:25 +0300 Subject: fix recommendations --- vnext/src/components/Thread.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vnext/src/components') diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js index 3de16a64..f6068614 100644 --- a/vnext/src/components/Thread.js +++ b/vnext/src/components/Thread.js @@ -41,7 +41,7 @@ export default class Thread extends React.Component { .then(response => { let msg = response.data.shift(); this.setState({ - msg: msg, + msg: {...msg}, replies: response.data, loading: false, active: 0 @@ -82,7 +82,7 @@ export default class Thread extends React.Component { msg.mid ? ( {this.state.active === (msg.rid || 0) && Write a comment...} - + ) : ( @@ -160,7 +160,7 @@ const linkStyle = { } function Recommendations({src, ...rest}) { - return src && ( + return src.length > 0 && (
{`Recommended by (${src.length}): `} { src.map(it => ( -- cgit v1.2.3