summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/youtube_video.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/youtube_video.jsx b/webapp/components/youtube_video.jsx
index d551364f3..93ea4f946 100644
--- a/webapp/components/youtube_video.jsx
+++ b/webapp/components/youtube_video.jsx
@@ -42,7 +42,7 @@ export default class YoutubeVideo extends React.Component {
const link = props.link;
const match = link.trim().match(ytRegex);
- if (!match || match[2].length !== 11) {
+ if (!match || match[1].length !== 11) {
return;
}
@@ -51,7 +51,7 @@ export default class YoutubeVideo extends React.Component {
}
this.setState({
- videoId: match[2],
+ videoId: match[1],
time: this.handleYoutubeTime(link)
});
}