Nullifying category before re-fetching

This commit is contained in:
James Barnsley
2017-01-19 11:50:33 +13:00
parent b12881057c
commit 334481541d

View File

@ -305,6 +305,14 @@ export function getCategories(){
export function getCategory( id ){
return (dispatch, getState) => {
dispatch({
type: 'CATEGORY_LOADED',
key: 'category:'+id,
category: {
playlists_uris: null
}
});
// get the category
sendRequest( dispatch, getState, 'browse/categories/'+id+'?country='+getState().spotify.country+'&locale='+getState().spotify.locale )
.then( response => {