From 8f7a975f060ceb1ea8b5d2a80d7aa009cfe5f4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harouna=20Traor=C3=A9?= Date: Tue, 1 Aug 2023 14:54:09 +0200 Subject: [PATCH] remove check for getDefault --- .../doc-type/ui/apos/components/AposDocEditor.vue | 4 ---- .../schema/ui/apos/components/AposInputRelationship.vue | 4 ---- .../widget-type/ui/apos/components/AposWidgetEditor.vue | 4 ---- 3 files changed, 12 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index acb59aa80b..352614144d 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -482,10 +482,6 @@ export default { }, getDefault() { const doc = {}; - if (this.readOnly || this.restoreOnly) { - return doc; - } - this.schema.forEach(field => { if (field.name.startsWith('_')) { return; diff --git a/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue b/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue index 2603f47828..99480d7a98 100644 --- a/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue +++ b/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue @@ -323,10 +323,6 @@ export default { }, getDefault() { const object = {}; - if (this.readOnly) { - return object; - } - this.field.schema.forEach(field => { if (field.name.startsWith('_')) { return; diff --git a/modules/@apostrophecms/widget-type/ui/apos/components/AposWidgetEditor.vue b/modules/@apostrophecms/widget-type/ui/apos/components/AposWidgetEditor.vue index 691b47d516..a35e3ef252 100644 --- a/modules/@apostrophecms/widget-type/ui/apos/components/AposWidgetEditor.vue +++ b/modules/@apostrophecms/widget-type/ui/apos/components/AposWidgetEditor.vue @@ -188,10 +188,6 @@ export default { }, getDefault() { const widget = {}; - if (this.readOnly) { - return widget; - } - this.schema.forEach(field => { if (field.name.startsWith('_')) { return;