From f9bb0a8d496a050a8615a68a2ab40276a2043d1b Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Mon, 22 May 2023 23:14:04 +0200 Subject: [PATCH] fix: return playlist title for "global favorites" playlist --- src/app/state/selectors.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/state/selectors.ts b/src/app/state/selectors.ts index ac7d12db4..5fc2d67d4 100644 --- a/src/app/state/selectors.ts +++ b/src/app/state/selectors.ts @@ -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]