Resolve TODO (workaround is necessary)

This commit is contained in:
Deluan 2020-05-05 12:35:50 -04:00
parent 0833d87f94
commit 0ee000a8a0
1 changed files with 2 additions and 6 deletions

View File

@ -21,12 +21,8 @@ export const AlbumActions = ({
const dispatch = useDispatch()
const translate = useTranslate()
// TODO Not sure why data is accumulating tracks from previous plays... Needs investigation. For now, filter out
// the unwanted tracks
const filteredData = ids.reduce((acc, id) => {
acc[id] = data[id]
return acc
}, {})
// Filter out tracks from other albums (cached by ReactAdmin)
const filteredData = ids.reduce((acc, id) => ({ ...acc, [id]: data[id] }), {})
return (
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>