diff --git a/src/components/tabbedPosts/services/tabbedPostsReducer.ts b/src/components/tabbedPosts/services/tabbedPostsReducer.ts index d19c54e54..6b43a0c70 100644 --- a/src/components/tabbedPosts/services/tabbedPostsReducer.ts +++ b/src/components/tabbedPosts/services/tabbedPostsReducer.ts @@ -157,27 +157,20 @@ export const cacheReducer = (state:PostsCache, action) => { } //update stat - const data = Object.create(state.cachedData); - data[filter] = { - ...cachedEntry, - startAuthor : _posts[_posts.length - 1] && _posts[_posts.length - 1].author, - startPermlink : _posts[_posts.length - 1] && _posts[_posts.length - 1].permlink, - posts : _posts, - } - // cachedEntry.startAuthor = _posts[_posts.length - 1] && _posts[_posts.length - 1].author; - // cachedEntry.startPermlink = _posts[_posts.length - 1] && _posts[_posts.length - 1].permlink; - // cachedEntry.posts = _posts; - // state.cachedData[filter] = cachedEntry; + cachedEntry.startAuthor = _posts[_posts.length - 1] && _posts[_posts.length - 1].author; + cachedEntry.startPermlink = _posts[_posts.length - 1] && _posts[_posts.length - 1].permlink; + cachedEntry.posts = _posts; + + state.cachedData[filter] = cachedEntry; - state.cachedData = data //dispatch to redux // if ( // filter === (state.selectedFilter !== 'feed' ? state.selectedFilter : state.currentSubFilter) // ) { // _setFeedPosts(_posts); // } - return state; + return Object.create(state); } case CacheActions.RESET_CURRENT_FILTER_CACHE: {