diff --git a/src/fragmentarium/domain/FragmentDtos.ts b/src/fragmentarium/domain/FragmentDtos.ts index 7a99fdbb2..3d315042c 100644 --- a/src/fragmentarium/domain/FragmentDtos.ts +++ b/src/fragmentarium/domain/FragmentDtos.ts @@ -68,7 +68,7 @@ export const ExternalNumberTypes = [ export type ExternalNumber = typeof ExternalNumberTypes[number] export type ExternalNumbers = { - [K in ExternalNumber]: string + [K in ExternalNumber]?: string } export default interface FragmentDto { diff --git a/src/fragmentarium/domain/fragment.ts b/src/fragmentarium/domain/fragment.ts index 4c1ef7107..48247aabe 100644 --- a/src/fragmentarium/domain/fragment.ts +++ b/src/fragmentarium/domain/fragment.ts @@ -232,7 +232,7 @@ export class Fragment { } private getExternalNumber(numberType: ExternalNumber): string { - return this.externalNumbers[numberType] + return this.externalNumbers[numberType] || '' } get cdliNumber(): string {