Skip to content

Commit

Permalink
throw error if we try to compare two different documents
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen committed Dec 18, 2024
1 parent 6c3d515 commit 567816a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export class UmbDocumentPublishedPendingChangesManager extends UmbControllerBase
async process(args: UmbDocumentPublishedPendingChangesManagerProcessArgs): Promise<void> {
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)) ?? [];

Expand Down

0 comments on commit 567816a

Please sign in to comment.