Skip to content

Commit

Permalink
Fix resetStore running stopped queries
Browse files Browse the repository at this point in the history
  • Loading branch information
paulshen committed Dec 9, 2016
1 parent 8da1319 commit 5143678
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,11 @@ export class QueryManager {
// the promise for it will be rejected and its results will not be written to the
// store.
Object.keys(this.observableQueries).forEach((queryId) => {
if (! this.observableQueries[queryId].observableQuery.options.noFetch) {
const storeQuery = this.reduxRootSelector(this.store.getState()).queries[queryId];

if (! this.observableQueries[queryId].observableQuery.options.noFetch &&
! (storeQuery && storeQuery.stopped)
) {
this.observableQueries[queryId].observableQuery.refetch();
}
});
Expand Down

0 comments on commit 5143678

Please sign in to comment.