Refactor/finish activities optimistic (#4106)

* Finished optimistic effects

* Fixed tests

* Added unit test on useActivityConnectionUtils to prepare for refactor

* Fixed console.log
This commit is contained in:
Lucas Bordeau
2024-02-21 18:54:14 +01:00
committed by GitHub
parent 02e9846282
commit 140d3460eb
26 changed files with 832 additions and 382 deletions

View File

@ -117,7 +117,10 @@ export const triggerUpdateRecordOptimisticEffect = ({
const rootQueryNextEdgesShouldBeSorted = isDefined(rootQueryOrderBy);
if (rootQueryNextEdgesShouldBeSorted) {
if (
rootQueryNextEdgesShouldBeSorted &&
Object.getOwnPropertyNames(rootQueryOrderBy).length > 0
) {
rootQueryNextEdges = sortCachedObjectEdges({
edges: rootQueryNextEdges,
orderBy: rootQueryOrderBy,