diff --git a/projects/common/ui-elements/cloze/cloze-element.ts b/projects/common/ui-elements/cloze/cloze-element.ts index 1beb2975732f9976c587f31965473cef6b00c862..2bb88eaacd06ebaaff853d07a8dc3f8b07d1bcec 100644 --- a/projects/common/ui-elements/cloze/cloze-element.ts +++ b/projects/common/ui-elements/cloze/cloze-element.ts @@ -67,6 +67,9 @@ export class ClozeElement extends CompoundElement implements PositionedElement, private static getParagraphCustomElements(documentPart: any): InputElement[] { console.log('fff', documentPart); + if (!documentPart.content) { + return []; + } return documentPart.content .filter((word: ClozeDocumentPart) => ['TextField', 'DropList', 'ToggleButton'].includes(word.type)) .reduce((accumulator: any[], currentValue: any) => {