mirror of
https://github.com/strapi/strapi.git
synced 2025-12-30 00:37:24 +00:00
only check if schema exists
This commit is contained in:
parent
53a4abeb77
commit
ea75258555
@ -116,12 +116,7 @@ const loadContentTypes = async (dir) => {
|
||||
const contentTypeName = normalizeName(fd.name);
|
||||
const contentType = await loadDir(join(dir, fd.name));
|
||||
|
||||
if (
|
||||
isEmpty(contentType) ||
|
||||
(isEmpty(contentType.schema) &&
|
||||
isEmpty(contentType.actions) &&
|
||||
isEmpty(contentType.lifecycles))
|
||||
) {
|
||||
if (isEmpty(contentType) || isEmpty(contentType.schema)) {
|
||||
throw new Error(`Could not load content type found at ${dir}`);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user