mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
Fix HalRepresentationWithEmbedded type (#1793)
Fix HalRepresentationWithEmbedded type since _embedded can be null. Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
This commit is contained in:
@@ -67,7 +67,7 @@ export const useChangesets = (
|
||||
const key = branchQueryKey(repository, branch, "changesets", request?.page || 0);
|
||||
return useQuery<ChangesetCollection, Error>(key, () => apiClient.get(link).then((response) => response.json()), {
|
||||
onSuccess: (changesetCollection) => {
|
||||
changesetCollection._embedded.changesets.forEach((changeset) => {
|
||||
changesetCollection._embedded?.changesets.forEach((changeset) => {
|
||||
queryClient.setQueryData(changesetQueryKey(repository, changeset.id), changeset);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user