Skip to content

Instantly share code, notes, and snippets.

@robcolburn
Created May 17, 2016 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robcolburn/3f172e1d4534f69006cb99c2eb17b8bb to your computer and use it in GitHub Desktop.
Save robcolburn/3f172e1d4534f69006cb99c2eb17b8bb to your computer and use it in GitHub Desktop.
diff --git a/reducers/entities.js b/reducers/entities.js
index 3cf689d..764be35 100644
--- a/reducers/entities.js
+++ b/reducers/entities.js
@@ -87,7 +87,10 @@ function storeVideos(state, { payload }) {
}
const normalShow = normalizeShow(payload, getRelationship(payload, video, 'show'));
newState[normalVideo.id] = normalVideo;
- newState[normalShow.id] = normalShow;
+ // VideoList may have stale Show entities, do not overwrite
+ if (!state[normalShow.id]) {
+ newState[normalShow.id] = normalShow;
+ }
return newState;
}, {
...state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment