Skip to content

Commit

Permalink
Fix issue with when the last template was removed the template refere…
Browse files Browse the repository at this point in the history
…nce-object was not returned as null (#17516)
  • Loading branch information
bergmania authored Nov 13, 2024
1 parent ba684a8 commit a342734
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class UmbDocumentTypeWorkspaceContext
this.structure.updateOwnerContentType({ allowedTemplates });
}

setDefaultTemplate(defaultTemplate: { id: string }) {
setDefaultTemplate(defaultTemplate: { id: string } | null) {
this.structure.updateOwnerContentType({ defaultTemplate });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class UmbDocumentTypeWorkspaceViewTemplatesElement extends UmbLitElement
return { id };
}) ?? [];
this.#workspaceContext?.setAllowedTemplateIds(idsWithoutRoot);
this.#workspaceContext?.setDefaultTemplate({ id: input.defaultUnique });
this.#workspaceContext?.setDefaultTemplate(input.defaultUnique ? { id: input.defaultUnique } : null);
}

override render() {
Expand Down

0 comments on commit a342734

Please sign in to comment.