Skip to content

Commit

Permalink
change isInitialLoading logic
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Jun 20, 2021
1 parent 58ece94 commit fcf228a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/create-loader-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const defaultLoader = (
isError: loading.status === 'error',
isSuccess: loading.status === 'success',
isLoading: loading.status === 'loading',
isInitialLoading: loading.status === 'loading' && loading.lastRun === 0,
isInitialLoading:
(loading.status === 'idle' || loading.status === 'loading') &&
loading.lastSuccess === 0,
};
};

Expand Down

0 comments on commit fcf228a

Please sign in to comment.