Add "links" collection to index resources, again (#1594)

With the introduction of react-query, it looks like the indexResources attribute of the repository initialization extension properties lost its collection links, which was replaces by _links. In this fix we copy this collection, so that the template plugin still can use links.

Fixes #1593
This commit is contained in:
René Pfeuffer
2021-03-17 09:36:25 +01:00
committed by GitHub
parent 48e9986f5a
commit d8092bec71
2 changed files with 4 additions and 1 deletions

View File

@@ -124,10 +124,11 @@ const RepositoryForm: FC<Props> = ({
if (isEditMode()) {
return null;
}
const indexResourcesWithLinks = { ...indexResources, links: indexResources?._links };
const extensionProps = {
repository: repo,
setCreationContextEntry: setCreationContextEntry,
indexResources
indexResources: indexResourcesWithLinks
};
return (
<>