diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-09-30 10:59:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-30 10:59:41 -0400 |
commit | a2deeed597dea15d9b7ca237be71988469f58cdd (patch) | |
tree | 95278fa4117395d14c5bcc66fb4b87fa5a33f6dd /webapp | |
parent | 29a3706ec3c3523ac8bf552c68e675f0c956986c (diff) | |
download | chat-a2deeed597dea15d9b7ca237be71988469f58cdd.tar.gz chat-a2deeed597dea15d9b7ca237be71988469f58cdd.tar.bz2 chat-a2deeed597dea15d9b7ca237be71988469f58cdd.zip |
Fixed the YouTube link regex referencing removed capture groups (#4129)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/youtube_video.jsx | 4 |
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) }); } |