mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
0590ac7826
## Summary While backend development, this change explicitly logs the location and index of a circular dependency, which helps getting rid of the circular dependency.
15 lines
785 B
Diff
15 lines
785 B
Diff
diff --git a/cjs/container-instance.class.js b/cjs/container-instance.class.js
|
|
index e473b1e652aa0b6e7462f7ba93fcef2812483b20..9e57857e5584373b88a9fad3fbb37bbcc56b554a 100644
|
|
--- a/cjs/container-instance.class.js
|
|
+++ b/cjs/container-instance.class.js
|
|
@@ -234,6 +234,9 @@ class ContainerInstance {
|
|
*/
|
|
initializeParams(target, paramTypes) {
|
|
return paramTypes.map((paramType, index) => {
|
|
+ if (paramType === undefined) {
|
|
+ throw new ReferenceError(`Circular dependency: Target${target.name}. Index: ${index} `);
|
|
+ }
|
|
const paramHandler = container_class_1.Container.handlers.find(handler => {
|
|
/**
|
|
* @Inject()-ed values are stored as parameter handlers and they reference their target
|