File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/app/domain-annotations Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,17 @@ namespace DomainAnnotations {
57
57
}
58
58
59
59
export function getDomainTypes ( structure ?: Structure ) : string [ ] {
60
- if ( ! structure ) return _emptyArray ;
61
- const prop = DomainAnnotationsProvider . get ( structure . models [ 0 ] ) . value ;
60
+ const model = structure ?. models [ 0 ] ;
61
+ if ( ! model ) return _emptyArray ;
62
+ const prop = DomainAnnotationsProvider . get ( model ) . value ;
62
63
if ( ! prop || ! prop . data ) return _emptyArray ;
63
64
return prop . data . domainTypes ;
64
65
}
65
66
66
67
export function getDomainNames ( structure ?: Structure ) : string [ ] [ ] {
67
- if ( ! structure ) return [ ] ;
68
- const prop = DomainAnnotationsProvider . get ( structure . models [ 0 ] ) . value ;
68
+ const model = structure ?. models [ 0 ] ;
69
+ if ( ! model ) return [ ] ;
70
+ const prop = DomainAnnotationsProvider . get ( model ) . value ;
69
71
if ( ! prop || ! prop . data ) return [ ] ;
70
72
return prop . data . domainNames ;
71
73
}
You can’t perform that action at this time.
0 commit comments