@@ -227,7 +227,11 @@ export class Injector {
227227 module : Module ,
228228 ) {
229229 if ( isUndefined ( param ) ) {
230- throw new UndefinedDependencyException ( wrapper . name , dependencyContext , module ) ;
230+ throw new UndefinedDependencyException (
231+ wrapper . name ,
232+ dependencyContext ,
233+ module ,
234+ ) ;
231235 }
232236 const token = this . resolveParamToken ( wrapper , param ) ;
233237 return this . resolveComponentInstance < T > (
@@ -293,7 +297,11 @@ export class Injector {
293297 dependencyContext . name ,
294298 ) ;
295299 if ( isNil ( instanceWrapper ) ) {
296- throw new UnknownDependenciesException ( wrapper . name , dependencyContext , module ) ;
300+ throw new UnknownDependenciesException (
301+ wrapper . name ,
302+ dependencyContext ,
303+ module ,
304+ ) ;
297305 }
298306 return instanceWrapper ;
299307 }
@@ -401,10 +409,9 @@ export class Injector {
401409 ) : Promise < T > {
402410 const { metatype, inject } = wrapper ;
403411 if ( isNil ( inject ) ) {
404- targetMetatype . instance = Object . assign (
405- targetMetatype . instance ,
406- new metatype ( ...instances ) ,
407- ) ;
412+ targetMetatype . instance = wrapper . forwardRef
413+ ? Object . assign ( targetMetatype . instance , new metatype ( ...instances ) )
414+ : new metatype ( ...instances ) ;
408415 } else {
409416 const factoryResult = ( ( targetMetatype . metatype as any ) as Function ) (
410417 ...instances ,
0 commit comments