From 3265265d32394e03c4657242b64b42559e381a8f Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Thu, 13 Oct 2022 14:56:35 +0200
Subject: [PATCH] Fix section element creation to produce proper classes

---
 projects/common/models/section.ts | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/projects/common/models/section.ts b/projects/common/models/section.ts
index 371ff70a5..97dc19dd9 100644
--- a/projects/common/models/section.ts
+++ b/projects/common/models/section.ts
@@ -51,10 +51,12 @@ export class Section {
     if (section?.gridRowSizes !== undefined) this.gridRowSizes = section.gridRowSizes;
     if (section?.activeAfterID) this.activeAfterID = section.activeAfterID;
     this.elements =
-      section?.elements?.map(element => ({
-        ...ElementFactory.createElement(element),
-        position: ElementFactory.initPositionProps(element.position)
-      } as PositionedUIElement)) || [];
+      section?.elements?.map(element => (
+        ElementFactory.createElement({
+          ...element,
+          position: ElementFactory.initPositionProps(element.position)
+        }) as PositionedUIElement)
+      ) || [];
   }
 
   setProperty(property: string, value: UIElementValue): void {
-- 
GitLab