summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_attachment_oembed.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-12-09 12:24:34 -0500
committerJoramWilander <jwawilander@gmail.com>2015-12-09 12:24:34 -0500
commit699230bb3f14a55acbf49a678df7fd87f865ae5b (patch)
treeb46345cef45e9479b06d4237565e5379e429758a /web/react/components/post_attachment_oembed.jsx
parent7f1b0cbd1f85149d7dce4caec33cbe0579cb64e3 (diff)
downloadchat-699230bb3f14a55acbf49a678df7fd87f865ae5b.tar.gz
chat-699230bb3f14a55acbf49a678df7fd87f865ae5b.tar.bz2
chat-699230bb3f14a55acbf49a678df7fd87f865ae5b.zip
Fix OEmbeds when switching channel, vine/soundcloud heights, and youtube embeds
Diffstat (limited to 'web/react/components/post_attachment_oembed.jsx')
-rw-r--r--web/react/components/post_attachment_oembed.jsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/react/components/post_attachment_oembed.jsx b/web/react/components/post_attachment_oembed.jsx
index 13c32f744..4b12ee95e 100644
--- a/web/react/components/post_attachment_oembed.jsx
+++ b/web/react/components/post_attachment_oembed.jsx
@@ -14,7 +14,14 @@ export default class PostAttachmentOEmbed extends React.Component {
}
componentWillReceiveProps(nextProps) {
- this.fetchData(nextProps.link);
+ if (nextProps.link !== this.props.link) {
+ this.isLoading = false;
+ this.fetchData(nextProps.link);
+ }
+ }
+
+ componentDidMount() {
+ this.fetchData(this.props.link);
}
fetchData(link) {