diff --git a/lib/services/mimetype-content-wrapper.ts b/lib/services/mimetype-content-wrapper.ts index b21062219..545d0444c 100644 --- a/lib/services/mimetype-content-wrapper.ts +++ b/lib/services/mimetype-content-wrapper.ts @@ -5,11 +5,10 @@ export class MimetypeContentWrapper { mimetype: string[], obj: Record ): Record<'content', ContentObject> { - const content = mimetype - .map((item) => ({ - [item]: obj - })) - .reduce((a, b) => ({ ...a, ...b }), {}); + const content = mimetype.reduce( + (acc, item) => ({ ...acc, [item]: obj }), + {} + ); return { content }; } }