Skip to content

Commit

Permalink
Adding guard for the playlistId
Browse files Browse the repository at this point in the history
  • Loading branch information
amankumarrr committed Jan 2, 2024
1 parent 16f445d commit 14c0db1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/blocks/youtubePlayList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const YoutubePlayListBlock: React.FC<YoutubePlayListProps> = ({
getYoutubePlaylist();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

if (!playlistId) {
return <></>;
}
return (
<>
{title && (
Expand Down

0 comments on commit 14c0db1

Please sign in to comment.