Skip to content
Prev Previous commit
Merge branch 'v1.5.0' into master
  • Loading branch information
prescottprue authored May 17, 2017
commit 096c77616fdd36dd5bf95ff992411cc331ebb435
12 changes: 3 additions & 9 deletions src/actions/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,8 @@ export const watchEvent = (firebase, dispatch, { type, path, populates, queryPar
const dataKey = snapshot.key
promisesForPopulate(firebase, dataKey, data, populates)
.then((results) => {
dispatch({
type: SET,
path: storeAs || resultPath,
data,
timestamp: Date.now(),
requesting: false,
requested: true
})
// dispatch child sets first so isLoaded is only set to true for
// populatedDataToJS after all data is in redux (Issue #121)
forEach(results, (result, path) => {
dispatch({
type: SET,
Expand All @@ -155,7 +149,7 @@ export const watchEvent = (firebase, dispatch, { type, path, populates, queryPar
})
dispatch({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This got moved to the dispatch after the populate children dispatches (keeps isLoaded from being true before all children are set to redux)

type: SET,
path: resultPath,
path: storeAs || resultPath,
data,
timestamp: Date.now(),
requesting: false,
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.