File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
packages/api-console-gui/src/app Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,8 @@ export class DataStructure {
38
38
}
39
39
40
40
export function extractDataStructure ( ds : DataStructure , type : Type ) : any {
41
- if ( type . kind === ReflectionKind . class || type . kind === ReflectionKind . objectLiteral ) {
42
- if ( ( isReferenceType ( type ) || isBackReferenceType ( type ) ) && ds . asReference ) {
43
- const primary = ReflectionClass . from ( type ) . getPrimary ( ) ;
44
- return extractDataStructure ( ds . properties [ primary . name ] , primary . type ) ;
45
- }
46
-
47
- return extractDataStructureFromSchema ( ds , ReflectionClass . from ( type ) ) ;
41
+ if ( type . kind === ReflectionKind . class && type . classType === Date ) {
42
+ return ds . value ;
48
43
} else if ( isMapType ( type ) ) {
49
44
const v : any = { } ;
50
45
if ( ! type . typeArguments ) return ;
@@ -76,6 +71,13 @@ export function extractDataStructure(ds: DataStructure, type: Type): any {
76
71
}
77
72
78
73
return list ;
74
+ } else if ( type . kind === ReflectionKind . class || type . kind === ReflectionKind . objectLiteral ) {
75
+ if ( ( isReferenceType ( type ) || isBackReferenceType ( type ) ) && ds . asReference ) {
76
+ const primary = ReflectionClass . from ( type ) . getPrimary ( ) ;
77
+ return extractDataStructure ( ds . properties [ primary . name ] , primary . type ) ;
78
+ }
79
+
80
+ return extractDataStructureFromSchema ( ds , ReflectionClass . from ( type ) ) ;
79
81
} else {
80
82
return ds . value ;
81
83
}
You can’t perform that action at this time.
0 commit comments