Skip to content

Commit

Permalink
chore(project): make tags optional in collection utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Jun 22, 2021
1 parent 4e16f59 commit c754f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getFiltersFromConfig = (config: Config, playlistId: string): string[] => {
const filterPlaylist = (playlist: PlaylistItem[], filter: string) => {
if (!filter) return playlist;

return playlist.filter(({ tags }) => tags.split(',').includes(filter));
return playlist.filter(({ tags }) => (tags ? tags.split(',').includes(filter) : false));
};

const getFiltersFromSeries = (series: PlaylistItem[]): string[] =>
Expand Down

0 comments on commit c754f95

Please sign in to comment.