From 222612e0a379969075b4c6dbfff9da1b7a46cafb Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Tue, 2 Aug 2022 19:45:03 +0200
Subject: [PATCH] [editor] Fix radio-group duplication

#283
---
 .../models/elements/input-elements/radio-button-group.ts    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/projects/common/models/elements/input-elements/radio-button-group.ts b/projects/common/models/elements/input-elements/radio-button-group.ts
index b6f4403c7..377c952b5 100644
--- a/projects/common/models/elements/input-elements/radio-button-group.ts
+++ b/projects/common/models/elements/input-elements/radio-button-group.ts
@@ -1,6 +1,8 @@
 import { Type } from '@angular/core';
 import { ElementFactory } from 'common/util/element.factory';
-import { BasicStyles, InputElement, PositionedUIElement, PositionProperties } from 'common/models/elements/element';
+import {
+  BasicStyles, InputElement, PositionedUIElement, PositionProperties
+} from 'common/models/elements/element';
 import { ElementComponent } from 'common/directives/element-component.directive';
 import { RadioButtonGroupComponent } from 'common/components/input-elements/radio-button-group.component';
 
@@ -15,7 +17,7 @@ export class RadioButtonGroupElement extends InputElement implements PositionedU
 
   constructor(element: Partial<RadioButtonGroupElement>, ...args: unknown[]) {
     super({ height: 100, ...element }, ...args);
-    if (element.richTextOptions) this.richTextOptions = element.richTextOptions;
+    if (element.richTextOptions) this.richTextOptions = [...element.richTextOptions];
     if (element.alignment) this.alignment = element.alignment;
     if (element.strikeOtherOptions) this.strikeOtherOptions = element.strikeOtherOptions;
     this.position = ElementFactory.initPositionProps({ marginBottom: 30, ...element.position });
-- 
GitLab