Created
April 6, 2016 19:34
-
-
Save colinta/11696023b0a9c812aa624083980c5a3c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/reducers/json.js b/src/reducers/json.js | |
index 9ece66d..a89dff1 100644 | |
--- a/src/reducers/json.js | |
+++ b/src/reducers/json.js | |
@@ -418,13 +418,12 @@ export default function json(state = {}, action = { type: '' }) { | |
keepers[collection] = action.payload.json[collection] | |
} | |
} | |
- return { ...state, ...keepers } | |
+ newState = { ...newState, ...keepers } | |
} | |
if (action.payload.profile) { | |
- methods.addModels(newState, MAPPING_TYPES.USERS, { users: action.payload.profile }) | |
- return newState | |
+ methods.addModels(newState, MAPPING_TYPES.USERS, { users: [action.payload.profile] }) | |
} | |
- return state | |
+ return newState | |
case LOCATION_CHANGE: | |
path = action.payload.pathname | |
if (action.payload.query.terms && prevTerms !== action.payload.query.terms) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment