File tree Expand file tree Collapse file tree
packages/basic/src/init/dataTypes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,6 +474,11 @@ function exactMatchShapeAgainstDef(value, def: any): boolean {
474474 // 在exactMatchShapeAgainstDef中,不应该去调用isInstanceOf。
475475 // 此时value未被绑定构造器,因此它会返回错误的值。
476476 return isInstanceOf ( value , genSortedTypeKey ( def ) ) ;
477+ } else if ( def . typeKind === 'reference' ) {
478+ const resolved = resolveTypeReference ( def ) ;
479+ if ( resolved ) {
480+ return exactMatchShapeAgainstDef ( value , resolved ) ;
481+ }
477482 } else if ( def . properties ) {
478483 // 此时 def 既可以为 anonymousStructure 也可以为 Structure/Entity 等等
479484 const properties = def . properties ;
@@ -495,11 +500,6 @@ function exactMatchShapeAgainstDef(value, def: any): boolean {
495500 } ) ;
496501 }
497502 return false ;
498- } else if ( def . typeKind === 'reference' ) {
499- const resolved = resolveTypeReference ( def ) ;
500- if ( resolved ) {
501- return exactMatchShapeAgainstDef ( value , resolved ) ;
502- }
503503 }
504504 return false ;
505505}
You can’t perform that action at this time.
0 commit comments