fix: return playlist title for "global favorites" playlist

This commit is contained in:
4gray committed 2023-05-22 23:14:04 +02:00
1 parent 67751096f9
commit f9bb0a8d49
1 file changed
+4 -1
+4 -1
View File
@@ -1,4 +1,5 @@
import { createFeatureSelector, createSelector } from '@ngrx/store';
import { GLOBAL_FAVORITES_PLAYLIST_ID } from '../../../shared/constants';
import * as fromPlaylistMetaState from './playlists.state';
import * as fromPlaylistState from './reducers';
import { PlaylistState } from './state';
@@ -62,7 +63,9 @@ export const selectPlaylistTitle = createSelector(
fromPlaylistMetaState.getPlaylistMetaEntities,
fromPlaylistState.selectPlaylistId,
(data) => {
if (
if (data.selectedId === GLOBAL_FAVORITES_PLAYLIST_ID) {
return 'Global favorites';
} else if (
data.entities &&
data.selectedId &&
data.entities[data.selectedId]