diff --git a/packages/core/strapi/src/Strapi.ts b/packages/core/strapi/src/Strapi.ts index d1f7e3078d..af5cda6dfe 100644 --- a/packages/core/strapi/src/Strapi.ts +++ b/packages/core/strapi/src/Strapi.ts @@ -381,7 +381,8 @@ class Strapi implements StrapiI { numberOfComponents: _.size(this.components), numberOfDynamicZones: getNumberOfDynamicZones(), numberOfCustomControllers: Object.values(this.controllers).filter( - factories.isCustomController + // TODO: Fix this at the content API loader level to prevent future types issues + (controller) => controller !== undefined && factories.isCustomController(controller) ).length, environment: this.config.environment, // TODO: to add back diff --git a/packages/core/strapi/src/factories.ts b/packages/core/strapi/src/factories.ts index 798886cd55..76e6aa260d 100644 --- a/packages/core/strapi/src/factories.ts +++ b/packages/core/strapi/src/factories.ts @@ -43,8 +43,8 @@ const createCoreController = < Object.setPrototypeOf(userCtrl, baseController); - const isCustomController = typeof cfg !== 'undefined'; - if (isCustomController) { + const isCustom = typeof cfg !== 'undefined'; + if (isCustom) { Object.defineProperty(userCtrl, symbols.CustomController, { writable: false, configurable: false,