Merge pull request #1386 from umbraco/feature/improve-missing-super-destroy-message

improve error message on Controller Destroy mistake
This commit is contained in:
Niels Lyngsø
2024-03-06 10:15:47 +01:00
committed by GitHub

View File

@@ -121,7 +121,7 @@ export const UmbControllerHostMixin = <T extends ClassConstructor>(superClass: T
throw new Error(
`Controller with controller alias: '${ctrl.controllerAlias?.toString()}' and class name: '${
(ctrl as any).constructor.name
}', does not remove it self when destroyed. This can cause memory leaks. Please fix this issue.`,
}', does not remove it self when destroyed. This can cause memory leaks. Please fix this issue.\r\nThis usually occurs when you have a destroy() method that doesn't call super.destroy().`,
);
}
prev = ctrl;