From 15c9f1843a9b55cc2f2ff315c383e9a9007f66af Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 29 Jun 2018 22:05:01 +0200 Subject: [PATCH] Fix cloning. --- .../app/features/schemas/pages/schema/field.component.html | 2 +- .../app/features/schemas/pages/schema/schema-page.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Squidex/app/features/schemas/pages/schema/field.component.html b/src/Squidex/app/features/schemas/pages/schema/field.component.html index fa2388f21..28376f957 100644 --- a/src/Squidex/app/features/schemas/pages/schema/field.component.html +++ b/src/Squidex/app/features/schemas/pages/schema/field.component.html @@ -6,7 +6,7 @@ {{field.displayName}} - localizable + localizable
diff --git a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts index 6529f5348..ae56c6258 100644 --- a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts +++ b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts @@ -132,6 +132,8 @@ export class SchemaPageComponent implements OnDestroy, OnInit { if (copy.nested.length === 0) { delete copy['nested']; } else { + copy.nested = []; + for (let i = 0; i < copy.nested.length; i++) { const nestedField = copy.nested[i]; const nestedCopy = cleanup(nestedField, 'fieldId', 'parentId');