Commit dc756f4 1 parent ac4e6f9 commit dc756f4 Copy full SHA for dc756f4
File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,11 @@ export function autoinject(potentialTarget?: any): any {
8
8
let deco = function ( target ) {
9
9
if ( ! target . hasOwnProperty ( 'inject' ) ) {
10
10
target . inject = ( metadata . getOwn ( metadata . paramTypes , target ) || _emptyParameters ) . slice ( ) ;
11
- if ( target . inject &&
12
- target . inject . length > 0 ) {
13
- // TypeScript 3.0 metadata for "...rest" gives type "Object"
14
- // if last parameter is "Object", assume it's a ...rest and remove that metadata.
15
- if ( target . inject [ target . inject . length - 1 ] === Object ) {
16
- target . inject . splice ( - 1 , 1 ) ;
17
- }
11
+ // TypeScript 3.0 metadata for "...rest" gives type "Object"
12
+ // if last parameter is "Object", assume it's a ...rest and remove that metadata.
13
+ if ( target . inject . length > 0 &&
14
+ target . inject [ target . inject . length - 1 ] === Object ) {
15
+ target . inject . pop ( ) ;
18
16
}
19
17
}
20
18
} ;
You can’t perform that action at this time.
0 commit comments