From 243c6e1dd78e2cb54ad5cf84a3eb7f8e5f50c2b2 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Thu, 2 Feb 2023 22:36:39 +0100 Subject: [PATCH] add null check for workspace --- .../documents/entity-actions/save-document.entity-action.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/save-document.entity-action.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/save-document.entity-action.ts index a6a4e594fa..83bc7418ea 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/save-document.entity-action.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/save-document.entity-action.ts @@ -6,7 +6,7 @@ export class SaveDocumentEntityAction { #host: UmbControllerHostInterface; #key: string; #documentRepository: UmbDocumentRepository; - #workspaceContext: any; + #workspaceContext?: any; constructor(host: UmbControllerHostInterface, key: string) { this.#host = host; @@ -19,6 +19,7 @@ export class SaveDocumentEntityAction { } async execute() { + if (!this.#workspaceContext) return; // TODO: it doesn't get the updated value const document = this.#workspaceContext.getData(); this.#documentRepository.saveDetail(document);