Managing playlist tracks

This commit is contained in:
James Barnsley
2017-01-14 09:12:53 +13:00
parent c5bb4ee6ca
commit 74b7bf8675
7 changed files with 41 additions and 34 deletions

View File

@ -18,8 +18,6 @@ const SpotifyMiddleware = (function(){
break
case 'SPOTIFY_CREATE_PLAYLIST':
var playlist = state.ui.playlist
if( !store.getState().spotify.authorized ){
store.dispatch( uiActions.createNotification( "Must be logged in to Spotify to do that", 'bad' ) )
return
@ -28,7 +26,7 @@ const SpotifyMiddleware = (function(){
break
case 'SPOTIFY_REMOVE_PLAYLIST_TRACKS':
var playlist = state.ui.playlist
var playlist = state.ui.playlists[action.uri]
if( !store.getState().spotify.authorized ){
store.dispatch( uiActions.createNotification( "Must be logged in to Spotify to do that", 'bad' ) )