From 1f54ace63f8c56948f119fdfd2bf0d357789d768 Mon Sep 17 00:00:00 2001 From: DavertMik Date: Fri, 27 Dec 2024 03:50:18 +0200 Subject: [PATCH] added proxies to resolve circular dependencies --- lib/container.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/container.js b/lib/container.js index 13df14c51..8a00eb785 100644 --- a/lib/container.js +++ b/lib/container.js @@ -420,7 +420,8 @@ function loadSupportObject(modulePath, supportObjectName) { if (typeof obj === 'function') { // If it's a class (constructor function) if (obj.prototype && obj.prototype.constructor === obj) { - return new obj() + const ClassName = obj; + return new ClassName(); } // If it's a regular function return obj()