File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export class ParamMetadata {
102
102
103
103
constructor ( actionMetadata : ActionMetadata , args : ParamMetadataArgs ) {
104
104
this . actionMetadata = actionMetadata ;
105
-
105
+
106
106
this . target = args . object . constructor ;
107
107
this . method = args . method ;
108
108
this . extraOptions = args . extraOptions ;
@@ -114,7 +114,14 @@ export class ParamMetadata {
114
114
this . transform = args . transform ;
115
115
this . classTransform = args . classTransform ;
116
116
this . validate = args . validate ;
117
- this . targetType = args . explicitType ? args . explicitType : ( Reflect as any ) . getMetadata ( "design:paramtypes" , args . object , args . method ) [ args . index ] ;
117
+ if ( args . explicitType ) {
118
+ this . targetType = args . explicitType
119
+ } else {
120
+ const metadata = ( Reflect as any ) . getMetadata ( "design:paramtypes" , args . object , args . method ) ;
121
+ if ( typeof metadata != "undefined" ) {
122
+ this . targetType = metadata [ args . index ] ;
123
+ }
124
+ }
118
125
119
126
if ( this . targetType ) {
120
127
if ( this . targetType instanceof Function && this . targetType . name ) {
@@ -127,4 +134,4 @@ export class ParamMetadata {
127
134
}
128
135
}
129
136
130
- }
137
+ }
You can’t perform that action at this time.
0 commit comments