From 567816a7f78fe38fa465042e6c11b69232319a31 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 18 Dec 2024 10:23:50 +0100 Subject: [PATCH] throw error if we try to compare two different documents --- .../document-published-pending-changes.manager.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/pending-changes/document-published-pending-changes.manager.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/pending-changes/document-published-pending-changes.manager.ts index 07f2fdc79195..ec4ae71a493d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/pending-changes/document-published-pending-changes.manager.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/pending-changes/document-published-pending-changes.manager.ts @@ -29,6 +29,8 @@ export class UmbDocumentPublishedPendingChangesManager extends UmbControllerBase async process(args: UmbDocumentPublishedPendingChangesManagerProcessArgs): Promise { if (!args.persistedData) throw new Error('Persisted data is missing'); if (!args.publishedData) throw new Error('Published data is missing'); + if (args.persistedData.unique !== args.publishedData.unique) + throw new Error('Persisted and published data does not have the same unique'); const variantIds = args.persistedData.variants?.map((x) => UmbVariantId.Create(x)) ?? [];