Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(harvest): Check for file infos before fetch
We had a bug because `useDataCardFiles` was called with `(undefined, undefined)` This bug happened because `useParams` was used after `useDataCardFiles` But it still returned some fallback values due to query cache. So we always defaulted to some files the useQuery was able to get. Now we will throw if the hook is called without arguments. This case wasn't supposed to exist, as such it should be treated as an error It would be difficult to know what to do with empty arguments. Are they coming later? never? On the other hand I'm not sure at this moment if there are scenarios where that error can happen. We have no elegant error handler for it as of this commit.
- Loading branch information