Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[24.0] Fix hasOwner function for histories in client
The `hasOwner` function in `api/index.ts` was checking: ``` return "user_id" in history; ``` whereas, it also needed to check: ``` return "user_id" in history && history.user_id !== null; ``` because we assume histories (summaries) initally fetched for the `historyStore` without user_id are owned by the current user, but the key is still present in the backend return. This was causing a really troublesome bug in the `HistoryScrollList` found in the history selector modal, where we could constantly keep fetching `api/histories/count` since we didn't have the expected no. of histories loaded in the component; because `historiesProxy` (which only contains owned histories) would end up being empty.
- Loading branch information