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:
Eduard Heimbuch
2021-09-02 15:47:15 +02:00
committed by GitHub
parent 0ba8300051
commit 43e1ea06c8
16 changed files with 108 additions and 106 deletions

View File

@@ -51,7 +51,7 @@ const CloneInformation: FC<Props> = ({ url, repository }) => {
const error = changesetsError || defaultBranchError;
const branch = defaultBranchData?.defaultBranch;
const emptyRepository = changesets?._embedded.changesets.length === 0;
const emptyRepository = (changesets?._embedded?.changesets.length || 0) === 0;
return (
<div className="content">