Skip to content

Commit

Permalink
order props so they fit what came in (#17585)
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe authored Nov 20, 2024
1 parent b7713f9 commit 69e8a61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ export class UmbMergeContentVariantDataController extends UmbControllerBase {
// Combine data and persisted data depending on the selectedVariants. Always use the invariant values from the data.
// loops over each entry in values, determine wether the value should be from the data or the persisted data, depending on wether its a selectedVariant or an invariant value.
// loops over each entry in variants, determine wether the variant should be from the data or the persisted data, depending on the selectedVariants.
const result = {
...currentData,
values: await this.#processValues<ModelType['values'][0]>(
persistedData?.values,
currentData.values,
variantsToStore,
),
};
const result = { ...currentData };
result.values = await this.#processValues<ModelType['values'][0]>(
persistedData?.values,
currentData.values,
variantsToStore,
);

if (currentData.variants) {
// Notice for variants we do not want to include all the variants that we are processing. but just the once selected for the process. (Not include invariant if we are in a variant document) [NL]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export class UmbDocumentServerDataSource implements UmbDetailDataSource<UmbDocum
}),
variants: data.variants.map((variant) => {
return {
state: variant.state,
culture: variant.culture || null,
segment: variant.segment || null,
state: variant.state,
name: variant.name,
publishDate: variant.publishDate || null,
createDate: variant.createDate,
Expand Down

0 comments on commit 69e8a61

Please sign in to comment.