From ec527f0a39106e602f891170b15d34874b561e11 Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Thu, 20 Jun 2024 14:26:03 +0200 Subject: [PATCH] [table-child-overlay] Fix setting of variable 'savedText' --- .../compound-elements/table/table-child-overlay.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/common/components/compound-elements/table/table-child-overlay.component.ts b/projects/common/components/compound-elements/table/table-child-overlay.component.ts index 2c85dcacc..895be590d 100644 --- a/projects/common/components/compound-elements/table/table-child-overlay.component.ts +++ b/projects/common/components/compound-elements/table/table-child-overlay.component.ts @@ -65,7 +65,8 @@ export class TableChildOverlay implements OnInit { } if (this.childComponent.instance instanceof TextComponent) { this.childComponent.location.nativeElement.style.margin = '5px'; - this.childComponent.instance.savedText = this.savedTexts[this.element.id]; + this.childComponent.instance.savedText = + this.savedTexts ? this.savedTexts[this.element.id] : ''; } if (this.childComponent.instance instanceof DropListComponent) { this.childComponent.setInput('clozeContext', true); -- GitLab