Destructuring of spotify.me.id, should fix #638 (unreproucable)

This commit is contained in:
James Barnsley
2020-11-11 20:50:31 +13:00
parent eb7901d626
commit 13c96665e9
5 changed files with 93 additions and 22 deletions

View File

@ -354,6 +354,13 @@ class LibraryPlaylists extends React.Component {
const mapStateToProps = (state) => {
const source = state.ui.library_playlists_source || 'all';
const {
spotify: {
me: {
id: me_id,
} = {},
},
} = state;
const libraryUris = [];
if (source === 'all' || source === 'local') libraryUris.push('mopidy:library:playlists');
@ -369,7 +376,7 @@ const mapStateToProps = (state) => {
playlists: librarySelector(state),
loading_progress: processProgressSelector(state),
source,
me_id: (state.spotify.me ? state.spotify.me.id : false),
me_id,
view: state.ui.library_playlists_view,
sort: (state.ui.library_playlists_sort ? state.ui.library_playlists_sort : null),
sort_reverse: (state.ui.library_playlists_sort_reverse ? state.ui.library_playlists_sort_reverse : false),