forked from tanner/qotnews
Don't setStories when existing list is empty
This commit is contained in:
@@ -36,11 +36,6 @@ function Feed({ updateCache }) {
|
|||||||
|
|
||||||
if (!updated) return;
|
if (!updated) return;
|
||||||
|
|
||||||
if (!stories || !stories.length) {
|
|
||||||
setStories(newApiStories);
|
|
||||||
localStorage.setItem('stories', JSON.stringify(newApiStories));
|
|
||||||
}
|
|
||||||
|
|
||||||
setLoadingStatus({ current: 0, total: newApiStories.length });
|
setLoadingStatus({ current: 0, total: newApiStories.length });
|
||||||
|
|
||||||
let currentStories = Array.isArray(stories) ? [...stories] : [];
|
let currentStories = Array.isArray(stories) ? [...stories] : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user