From c09831e832b103ec1f3d2d422fcabc7c77f4c2ff Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 16 Mar 2022 19:33:39 +0100 Subject: [PATCH] #286 - Fix for content types not containing fields --- src/helpers/ArticleHelper.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/helpers/ArticleHelper.ts b/src/helpers/ArticleHelper.ts index 480552dc..76572126 100644 --- a/src/helpers/ArticleHelper.ts +++ b/src/helpers/ArticleHelper.ts @@ -242,7 +242,14 @@ export class ArticleHelper { if (!contentType) { contentType = contentTypes.find(ct => ct.name === DEFAULT_CONTENT_TYPE_NAME); } - return contentType || DEFAULT_CONTENT_TYPE; + + if (contentType) { + if (!contentType.fields) { + contentType.fields = DEFAULT_CONTENT_TYPE.fields; + } + } + + return DEFAULT_CONTENT_TYPE; } /**