Describe the bug
The error states of a query collection (collection.utils.errorCount, collection.utils.isError) are not being cleared when a collection returns an empty list.
To Reproduce
- Have a query collection throw an error
- Call
collection.utils.clearError() to clear the error and trigger queryFn again
-> when queryFn returns an empty list, the error states are not updated at all
-> when queryFn returns a list with at least one item, then the collection error states are cleared properly
Expected behavior
When the queryFn returns an empty list, it should clear the error and show the data being empty.
- OS: macOS
- Browser: Helium (chromium)
- Version: 0.7.9.1 (Official Build, Chromium 143.0.7499.169) (arm64)
Minimal repro
https://github.com/utopyin/db-error-not-clearing-when-empty