summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_body.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/post_body.jsx')
-rw-r--r--web/react/components/post_body.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index b187acba3..506b38ce6 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -41,7 +41,7 @@ class PostBody extends React.Component {
const linkData = Utils.extractLinks(this.props.post.message);
this.state = {
- links: linkData.links,
+ links: linkData,
post: this.props.post
};
}
@@ -86,10 +86,10 @@ class PostBody extends React.Component {
componentWillReceiveProps(nextProps) {
const linkData = Utils.extractLinks(nextProps.post.message);
if (this.props.post.filenames.length === 0 && this.state.links && this.state.links.length > 0) {
- this.embed = this.createEmbed(linkData.links[0]);
+ this.embed = this.createEmbed(linkData[0]);
}
this.setState({
- links: linkData.links
+ links: linkData
});
}