Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

[ui] Handle empty transfer link bodies #77

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/api-client/packages/sdk/src/client/vcd.api.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class VcdApiClient {
const headerLinks: LinkType[] = res.headers.has(HATEOAS_HEADER)
? parseHeaderHateoasLinks(res.headers.get(HATEOAS_HEADER))
: [];
const links: LinkType[] = res.body.link || [];
const links: LinkType[] = res.body ? (res.body.link || []) : [];
const link = [...headerLinks, ...links]
.find((link) => link.rel == transferRel);
if (!link) {
Expand Down