move comments

This commit is contained in:
Niels Lyngsø
2024-10-03 21:04:07 +02:00
parent 1f76a3a299
commit 65fa26a440

View File

@@ -785,8 +785,6 @@ export class UmbDocumentWorkspaceContext
if (!result?.selection.length) return;
// TODO: Validate content & Save changes for the selected variants? — Or be clear that changes are not part of this action. [NL]
// Map to the correct format for the API (UmbDocumentVariantPublishModel)
const variants =
result?.selection.map<UmbDocumentVariantPublishModel>((x) => ({
@@ -796,6 +794,8 @@ export class UmbDocumentWorkspaceContext
if (!variants.length) return;
// TODO: Validate content & Save changes for the selected variants — This was how it worked in v.13 [NL]
const unique = this.getUnique();
if (!unique) throw new Error('Unique is missing');
await this.publishingRepository.publish(unique, variants);
@@ -833,7 +833,7 @@ export class UmbDocumentWorkspaceContext
if (!variantIds.length) return;
// TODO: Validate content & Save changes for the selected variants?Or be clear that changes are not part of this action. [NL]
// TODO: Validate content & Save changes for the selected variants — This was how it worked in v.13 [NL]
const unique = this.getUnique();
if (!unique) throw new Error('Unique is missing');