From f9162293d72a2b680af4941e10127f83a0822281 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Mon, 11 Nov 2024 10:17:44 +0000 Subject: [PATCH] Fixes Document Workspace Info Link error Ensures that `_unique` has value. This was previously throwing an error, but given how `observeMultiple` works, it is expected that `_unique` may be `undefined` when navigating away from the Info view. --- .../views/info/document-workspace-view-info-links.element.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts index f244371dfafc..ed3170417318 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts @@ -48,8 +48,7 @@ export class UmbDocumentWorkspaceViewInfoLinksElement extends UmbLitElement { async #requestUrls() { if (this._isNew) return; - - if (!this._unique) throw new Error('Document unique is required'); + if (!this._unique) return; const { data } = await this.#documentUrlRepository.requestItems([this._unique]);