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()