Fixed: Improve Selection of Executing Commands in Artist list

This commit is contained in:
Qstick
2019-04-05 23:03:42 -04:00
parent 789ce8a58f
commit 63f9338d2f
3 changed files with 22 additions and 13 deletions
@@ -1,4 +1,3 @@
import _ from 'lodash';
import { createSelector } from 'reselect';
import createAllArtistSelector from './createAllArtistSelector';
@@ -6,8 +5,8 @@ function createArtistSelector() {
return createSelector(
(state, { artistId }) => artistId,
createAllArtistSelector(),
(artistId, artist) => {
return _.find(artist, { id: artistId });
(artistId, allArtists) => {
return allArtists.find((artist) => artist.id === artistId );
}
);
}