Skip to content

Commit

Permalink
Merge pull request #3983 from Slavvkko/fix-dataProvider-error-null
Browse files Browse the repository at this point in the history
useQueryWithStore and useGetMany returns error: null when success after firs fail
  • Loading branch information
fzaninotto authored Nov 14, 2019
2 parents 58a170a + a4a3ffb commit 26bde6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ra-core/src/dataProvider/useGetMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ const callQueries = debounce(() => {
queries.forEach(({ ids, setState, onSuccess }) => {
setState(prevState => ({
...prevState,
error: null,
loading: false,
loaded: true,
}));
Expand Down
1 change: 1 addition & 0 deletions packages/ra-core/src/dataProvider/useQueryWithStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const useQueryWithStore = (
// will be empty, so it should not be used at all.
setState(prevState => ({
...prevState,
error: null,
loading: false,
loaded: true,
}));
Expand Down

0 comments on commit 26bde6d

Please sign in to comment.