Fixed the YouTube link regex referencing removed capture groups (#4129)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
29a3706ec3
Коммит
a2deeed597
@@ -42,7 +42,7 @@ export default class YoutubeVideo extends React.Component {
|
|||||||
const link = props.link;
|
const link = props.link;
|
||||||
|
|
||||||
const match = link.trim().match(ytRegex);
|
const match = link.trim().match(ytRegex);
|
||||||
if (!match || match[2].length !== 11) {
|
if (!match || match[1].length !== 11) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ export default class YoutubeVideo extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
videoId: match[2],
|
videoId: match[1],
|
||||||
time: this.handleYoutubeTime(link)
|
time: this.handleYoutubeTime(link)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user