File tree Expand file tree Collapse file tree
packages/common/decorators/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ export function Inject<T = any>(token?: T) {
1515 token && isFunction ( token ) ? ( ( token as any ) as Function ) . name : token ;
1616
1717 if ( ! isUndefined ( index ) ) {
18- const dependencies =
18+ let dependencies =
1919 Reflect . getMetadata ( SELF_DECLARED_DEPS_METADATA , target ) || [ ] ;
2020
21- dependencies . push ( { index, param : type } ) ;
21+ dependencies = [ ... dependencies , { index, param : type } ] ;
2222 Reflect . defineMetadata ( SELF_DECLARED_DEPS_METADATA , dependencies , target ) ;
2323 return ;
2424 }
25- const properties =
25+ let properties =
2626 Reflect . getMetadata ( PROPERTY_DEPS_METADATA , target . constructor ) || [ ] ;
2727
28- properties . push ( { key, type } ) ;
28+ properties = [ ... properties , { key, type } ] ;
2929 Reflect . defineMetadata (
3030 PROPERTY_DEPS_METADATA ,
3131 properties ,
You can’t perform that action at this time.
0 commit comments