diff --git a/packages/core/content-manager/server/src/history/services/utils.ts b/packages/core/content-manager/server/src/history/services/utils.ts index 77861c9d34..32b3990ea7 100644 --- a/packages/core/content-manager/server/src/history/services/utils.ts +++ b/packages/core/content-manager/server/src/history/services/utils.ts @@ -1,5 +1,5 @@ import { difference, omit } from 'lodash/fp'; -import { Schema } from '@strapi/types'; +import type { Struct } from '@strapi/types'; import { CreateHistoryVersion } from '../../../../shared/contracts/history-versions'; import { FIELDS_TO_IGNORE } from '../constants'; @@ -9,13 +9,10 @@ import { FIELDS_TO_IGNORE } from '../constants'; */ export const getSchemaAttributesDiff = ( versionSchemaAttributes: CreateHistoryVersion['schema'], - contentTypeSchemaAttributes: Schema.Attributes + contentTypeSchemaAttributes: Struct.SchemaAttributes ) => { // Omit the same fields that were omitted when creating a history version - const sanitizedContentTypeSchemaAttributes = omit( - FIELDS_TO_IGNORE, - contentTypeSchemaAttributes - ) as CreateHistoryVersion['schema']; + const sanitizedContentTypeSchemaAttributes = omit(FIELDS_TO_IGNORE, contentTypeSchemaAttributes); const reduceDifferenceToAttributesObject = ( diffKeys: string[],