From 334481541d9f7bba057db1d825c213ad5a7caafb Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Thu, 19 Jan 2017 11:50:33 +1300 Subject: [PATCH] Nullifying category before re-fetching --- src/js/services/spotify/actions.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/services/spotify/actions.js b/src/js/services/spotify/actions.js index 81036664..f4c585d3 100755 --- a/src/js/services/spotify/actions.js +++ b/src/js/services/spotify/actions.js @@ -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 => {