Skip to content

Commit

Permalink
added proxies to resolve circular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Dec 27, 2024
1 parent 0a27b34 commit 1f54ace
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1f54ace

Please sign in to comment.