diff --git a/front/src/components/library/EditCard.vue b/front/src/components/library/EditCard.vue index 0096cf053..3c5b318d9 100644 --- a/front/src/components/library/EditCard.vue +++ b/front/src/components/library/EditCard.vue @@ -84,14 +84,14 @@ const updatedFields = computed(() => { return fields.map((id) => { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const config = configs[props.obj.target!.type].fields.find((field) => id === field.id) - const getValueRepr = config?.getValueRepr || (v => v) + const getValueRepr = config?.getValueRepr ?? (v => v) const result = { id, config, new: payload[id], newRepr: getValueRepr(payload[id]) ?? '', - old: undefined as ReviewStatePayload, + old: undefined, oldRepr: '', diff: [] as Change[] } diff --git a/front/src/types.ts b/front/src/types.ts index c720190d6..18d6fb4bf 100644 --- a/front/src/types.ts +++ b/front/src/types.ts @@ -400,7 +400,7 @@ export interface ReportTarget { type: EntityObjectType } -export type ReviewStatePayload = { value: string } | string | undefined +export type ReviewStatePayload = Partial | Partial | Partial export interface ReviewState { [id: string]: ReviewStatePayload }