Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class UmbDocumentServerDataSource
variants: [],
};

const scaffold = umbDeepMerge(defaultData, preset) as UmbDocumentDetailModel;
const scaffold = umbDeepMerge(preset, defaultData);

return { data: scaffold };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class UmbMediaServerDataSource extends UmbControllerBase implements UmbDe
],
};

const scaffold = umbDeepMerge(defaultData, preset) as UmbMediaDetailModel;
const scaffold = umbDeepMerge(preset, defaultData);

return { data: scaffold };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { UmbDetailDataSource } from '@umbraco-cms/backoffice/repository';
import type { CreateMemberRequestModel, UpdateMemberRequestModel } from '@umbraco-cms/backoffice/external/backend-api';
import { MemberService } from '@umbraco-cms/backoffice/external/backend-api';
import { tryExecute } from '@umbraco-cms/backoffice/resources';
import { umbDeepMerge } from '@umbraco-cms/backoffice/utils';
import {umbDeepMerge, type UmbDeepPartialObject} from '@umbraco-cms/backoffice/utils';
import { UmbMemberTypeDetailServerDataSource } from '@umbraco-cms/backoffice/member-type';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';

Expand All @@ -22,7 +22,7 @@ export class UmbMemberServerDataSource extends UmbControllerBase implements UmbD
* @returns { CreateMemberRequestModel }
* @memberof UmbMemberServerDataSource
*/
async createScaffold(preset: Partial<UmbMemberDetailModel> = {}) {
async createScaffold(preset: UmbDeepPartialObject<UmbMemberDetailModel> = {}) {
let memberTypeIcon = '';

const memberTypeUnique = preset.memberType?.unique;
Expand Down Expand Up @@ -64,7 +64,7 @@ export class UmbMemberServerDataSource extends UmbControllerBase implements UmbD
],
};

const scaffold = umbDeepMerge(defaultData, preset) as UmbMemberDetailModel;
const scaffold = umbDeepMerge(preset, defaultData);

return { data: scaffold };
}
Expand Down
Loading