Skip to content

Commit

Permalink
Merge fe96bf6 into c6ec887
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Dec 6, 2018
2 parents c6ec887 + fe96bf6 commit 5353b72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/common/decorators/core/inject.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export function Inject<T = any>(token?: T) {
token && isFunction(token) ? ((token as any) as Function).name : token;

if (!isUndefined(index)) {
const dependencies =
let dependencies =
Reflect.getMetadata(SELF_DECLARED_DEPS_METADATA, target) || [];

dependencies.push({ index, param: type });
dependencies = [...dependencies, { index, param: type }];
Reflect.defineMetadata(SELF_DECLARED_DEPS_METADATA, dependencies, target);
return;
}
const properties =
let properties =
Reflect.getMetadata(PROPERTY_DEPS_METADATA, target.constructor) || [];

properties.push({ key, type });
properties = [...properties, { key, type }];
Reflect.defineMetadata(
PROPERTY_DEPS_METADATA,
properties,
Expand Down

0 comments on commit 5353b72

Please sign in to comment.