diff --git a/geonode_mapstore_client/client/js/epics/favorite.js b/geonode_mapstore_client/client/js/epics/favorite.js index 38a351bf40..89dc942137 100644 --- a/geonode_mapstore_client/client/js/epics/favorite.js +++ b/geonode_mapstore_client/client/js/epics/favorite.js @@ -44,7 +44,7 @@ export const gnSaveFavoriteContent = (action$, store) => return Observable.of( updateResources(newResources, true), // if on favorites filter page, we must adjust total count appropriately - ...((state?.gnsearch?.params?.f?.includes('favorite') && !action.favorite) ? [reduceTotalCount()] : [increaseTotalCount()]) + ...(state?.gnsearch?.params?.f?.includes('favorite') ? (!action.favorite ? [reduceTotalCount()] : [increaseTotalCount()]) : []) ); }) .catch((error) => {