diff --git a/src/utils/youtube.js b/src/utils/youtube.js index 807c503..955a589 100644 --- a/src/utils/youtube.js +++ b/src/utils/youtube.js @@ -81,6 +81,10 @@ export async function getVideosFromPlaylist(access_token, playlist_id) { maxResults: 10 }).then(res => res); + if(videos.status > 299 || videos.status < 200) { + return []; + } + return videos.data.items; }