mirror of
https://github.com/strapi/strapi.git
synced 2025-10-27 16:10:08 +00:00
Merge pull request #19144 from strapi/fix/undefined-controller-in-startup-telemetry
This commit is contained in:
commit
a99ed82a44
@ -381,7 +381,8 @@ class Strapi implements StrapiI {
|
||||
numberOfComponents: _.size(this.components),
|
||||
numberOfDynamicZones: getNumberOfDynamicZones(),
|
||||
numberOfCustomControllers: Object.values<Common.Controller>(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
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user