File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export class TransformOperationExecutor {
35
35
isMap : boolean ,
36
36
level : number = 0 ) {
37
37
38
- if ( value instanceof Array || value instanceof Set ) {
38
+ if ( Array . isArray ( value ) || value instanceof Set ) {
39
39
const newValue = arrayType && this . transformationType === TransformationType . PLAIN_TO_CLASS ? new ( arrayType as any ) ( ) : [ ] ;
40
40
( value as any [ ] ) . forEach ( ( subValue , index ) => {
41
41
const subSource = source ? source [ index ] : undefined ;
@@ -145,7 +145,7 @@ export class TransformOperationExecutor {
145
145
}
146
146
147
147
// if value is an array try to get its custom array type
148
- const arrayType = value [ valueKey ] instanceof Array ? this . getReflectedType ( targetType , propertyName ) : undefined ;
148
+ const arrayType = Array . isArray ( value [ valueKey ] ) ? this . getReflectedType ( targetType , propertyName ) : undefined ;
149
149
// const subValueKey = TransformationType === TransformationType.PLAIN_TO_CLASS && newKeyName ? newKeyName : key;
150
150
const subSource = source ? source [ valueKey ] : undefined ;
151
151
You can’t perform that action at this time.
0 commit comments