Skip to content

Commit

Permalink
fix: query.state.isFetching defaults to the loading status, despite l…
Browse files Browse the repository at this point in the history
…ack of data

Fixes #624
  • Loading branch information
tannerlinsley committed Jun 24, 2020
1 parent 4c741f7 commit fd280ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/queryCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,7 @@ function switchActions(state, action) {
return {
status: action.initialStatus,
error: null,
isFetching:
!action.hasInitialData || action.initialStatus === 'loading',
isFetching: action.initialStatus === 'loading',
canFetchMore: false,
failureCount: 0,
isStale: action.isStale,
Expand Down

0 comments on commit fd280ec

Please sign in to comment.