Skip to content

Commit

Permalink
Fix - Magic URL not working for youtube short URL
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Nov 3, 2018
1 parent 76dea00 commit 8286edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import queryString from 'query-string';
*/
const prepareYoutubeUrl = (url) => {
const parsedUrl = parseUrl(url, true);
if (!parsedUrl.host.includes('youtube.com')) {
if (!parsedUrl.host.includes('youtube.com') && !parsedUrl.host.includes('youtu.be')) {
return url;
}

Expand Down

0 comments on commit 8286edf

Please sign in to comment.