From 9f4942572759041981f8f57f5e3b8d8716b21406 Mon Sep 17 00:00:00 2001 From: Raditya Harya Date: Fri, 26 Apr 2024 17:51:36 +0700 Subject: [PATCH] Fix deduplication logic in PlaylistComponent --- src/components/nodes/Library/Playlist.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/nodes/Library/Playlist.tsx b/src/components/nodes/Library/Playlist.tsx index db2f950..a26db35 100644 --- a/src/components/nodes/Library/Playlist.tsx +++ b/src/components/nodes/Library/Playlist.tsx @@ -147,7 +147,7 @@ const PlaylistComponent: React.FC = ({ 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]);