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.
This commit is contained in:
leekelleher
2024-11-11 10:17:44 +00:00
committed by Jacob Overgaard
parent 5f1cb0e70d
commit f9162293d7

View File

@@ -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]);