mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-07 13:54:42 +02:00
#286 - Fix for content types not containing fields
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user