File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,21 @@ const compile = (schema, ast) => pipe(
1616) ;
1717
1818const interpret = ( dependencies , instance , context ) => {
19- const value = Instance . value ( instance ) ;
19+ if ( Instance . typeOf ( instance ) !== "object" ) {
20+ return true ;
21+ }
2022
21- return Instance . typeOf ( instance ) !== "object" || dependencies . every ( ( [ propertyName , dependency ] ) => {
22- if ( ! ( propertyName in value ) ) {
23+ return dependencies . every ( ( [ propertyName , dependency ] ) => {
24+ if ( ! Instance . has ( propertyName , instance ) ) {
2325 return true ;
2426 }
2527
2628 if ( Array . isArray ( dependency ) ) {
27- return dependency . every ( ( key ) => key in value ) ;
29+ return dependency . every ( ( key ) => Instance . has ( key , instance ) ) ;
2830 } else {
2931 return Validation . interpret ( dependency , instance , context ) ;
3032 }
3133 } ) ;
3234} ;
3335
34- const simpleApplicator = true ;
35-
36- export default { id, compile, interpret, simpleApplicator } ;
36+ export default { id, compile, interpret } ;
You can’t perform that action at this time.
0 commit comments