Skip to content

Commit

Permalink
Fix deduplication logic in PlaylistComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
radityaharya committed Apr 26, 2024
1 parent 40536c7 commit 9f49425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/nodes/Library/Playlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const PlaylistComponent: React.FC<PlaylistProps> = ({ id, data }) => {
);
const data = await response.json();
const newPlaylists = userPlaylists.concat(data);
let dedupedPlaylists = newPlaylists.reduce((acc, current) => {
const dedupedPlaylists = newPlaylists.reduce((acc, current) => {
const x = acc.find(item => item.playlistId === current.playlistId);
if (!x) {
return acc.concat([current]);
Expand Down

0 comments on commit 9f49425

Please sign in to comment.