diff --git a/frontend/src/components/PostEmbed.tsx b/frontend/src/components/PostEmbed.tsx index 85ff567..abb0fbe 100644 --- a/frontend/src/components/PostEmbed.tsx +++ b/frontend/src/components/PostEmbed.tsx @@ -27,7 +27,7 @@ export default (({ post }: Props) => { return case 'youtube.com': { - const [videoId] = url.pathname.match (/(?<=\/watch\?v\=)[a-zA-Z0-9]+?(?=\/|$|&)/)! + const videoId = url.searchParams.get ('v')! return (