mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +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), |           numberOfComponents: _.size(this.components), | ||||||
|           numberOfDynamicZones: getNumberOfDynamicZones(), |           numberOfDynamicZones: getNumberOfDynamicZones(), | ||||||
|           numberOfCustomControllers: Object.values<Common.Controller>(this.controllers).filter( |           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, |           ).length, | ||||||
|           environment: this.config.environment, |           environment: this.config.environment, | ||||||
|           // TODO: to add back
 |           // TODO: to add back
 | ||||||
|  | |||||||
| @ -43,8 +43,8 @@ const createCoreController = < | |||||||
| 
 | 
 | ||||||
|     Object.setPrototypeOf(userCtrl, baseController); |     Object.setPrototypeOf(userCtrl, baseController); | ||||||
| 
 | 
 | ||||||
|     const isCustomController = typeof cfg !== 'undefined'; |     const isCustom = typeof cfg !== 'undefined'; | ||||||
|     if (isCustomController) { |     if (isCustom) { | ||||||
|       Object.defineProperty(userCtrl, symbols.CustomController, { |       Object.defineProperty(userCtrl, symbols.CustomController, { | ||||||
|         writable: false, |         writable: false, | ||||||
|         configurable: false, |         configurable: false, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jean-Sébastien Herbaux
						Jean-Sébastien Herbaux