aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/components/Thread.js6
1 files changed, 3 insertions, 3 deletions
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 ? (
<Message data={msg} visitor={this.props.visitor}>
{this.state.active === (msg.rid || 0) && <MessageInput data={msg} onSend={this.postComment}>Write a comment...</MessageInput>}
- <Recommendations src={msg.recommendations} />
+ <Recommendations src={msg.recommendations || []} />
</Message>
) : (
<Spinner />
@@ -160,7 +160,7 @@ const linkStyle = {
}
function Recommendations({src, ...rest}) {
- return src && (
+ return src.length > 0 && (
<div className="msg-recomms">{`Recommended by (${src.length}): `}
{
src.map(it => (