From 831c0e1e8766424f7a1e4270f8813878266ddf8e Mon Sep 17 00:00:00 2001 From: Sebastian Klingler Date: Wed, 29 May 2024 13:42:57 -0500 Subject: [PATCH] Fix album tile playback (#8637) --- packages/common/src/store/queue/selectors.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/common/src/store/queue/selectors.ts b/packages/common/src/store/queue/selectors.ts index 24adc6f558f..1bde53e71a2 100644 --- a/packages/common/src/store/queue/selectors.ts +++ b/packages/common/src/store/queue/selectors.ts @@ -3,7 +3,7 @@ import { createSelector } from 'reselect' import { UID } from '../../models' import { Uid } from '../../utils/uid' import { cacheUsersSelectors, cacheTracksSelectors } from '../cache' -import { playerSelectors } from '../player' +import { PlayerBehavior, playerSelectors } from '../player' import { CommonState } from '../reducers' const { getUid: getPlayerUid, getTrackId: getPlayerTrackId } = playerSelectors @@ -36,8 +36,9 @@ export const getId = (state: CommonState) => isQueueIndexValid(state) ? state.queue.order[state.queue.index].id : null export const getPlayerBehavior = (state: CommonState) => isQueueIndexValid(state) - ? state.queue.order[state.queue.index].playerBehavior - : null + ? state.queue.order[state.queue.index].playerBehavior ?? + PlayerBehavior.FULL_OR_PREVIEW + : PlayerBehavior.FULL_OR_PREVIEW export const getCollectible = (state: CommonState) => { if (!isQueueIndexValid(state)) return null return state.queue.order[state.queue.index].collectible ?? null