File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/contentstack-audit/src/modules Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -540,10 +540,9 @@ export default class ContentType {
540540 } ) ;
541541 } else if ( ! field . schema && this . moduleName === 'content-types' ) {
542542 const gfSchema = find ( this . gfSchema , { uid : field . reference_to } ) ?. schema ;
543-
544543 if ( gfSchema ) {
545544 field . schema = gfSchema as GlobalFieldSchemaTypes [ ] ;
546-
545+ } else {
547546 this . missingRefs [ this . currentUid ] . push ( {
548547 tree,
549548 data_type,
@@ -558,8 +557,11 @@ export default class ContentType {
558557 } else if ( ! field . schema && this . moduleName === 'global-fields' ) {
559558 const gfSchema = find ( this . gfSchema , { uid : field . reference_to } ) ?. schema ;
560559 if ( gfSchema ) {
560+
561561 field . schema = gfSchema as GlobalFieldSchemaTypes [ ] ;
562562
563+
564+ } else {
563565 this . missingRefs [ this . currentUid ] . push ( {
564566 tree,
565567 data_type,
@@ -572,7 +574,6 @@ export default class ContentType {
572574 } ) ;
573575 }
574576 }
575-
576577 return refExist ? field : null ;
577578 }
578579
You can’t perform that action at this time.
0 commit comments