From bb965225fc75f3ba2db339f353bf80def372703c Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Mon, 5 Jul 2021 16:27:40 +0200
Subject: [PATCH] Add initial section to newly created page

---
 projects/editor/src/app/unit.service.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/projects/editor/src/app/unit.service.ts b/projects/editor/src/app/unit.service.ts
index 0d5d8204d..42a851b94 100644
--- a/projects/editor/src/app/unit.service.ts
+++ b/projects/editor/src/app/unit.service.ts
@@ -62,6 +62,7 @@ export class UnitService {
 
   addPage(): void {
     const newPage = UnitFactory.createUnitPage();
+    newPage.sections.push(UnitFactory.createUnitPageSection());
     this._unit.value.pages.push(newPage);
     this._pages.push(new BehaviorSubject(newPage as UnitPage));
     this._unit.next(this._unit.value);
-- 
GitLab