File tree 2 files changed +2
-1
lines changed
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function isExpandable(obj) {
14
14
( fun ( obj . additionalProperties ) && obj . additionalProperties ( ) ) ||
15
15
( fun ( obj . extensions ) && obj . extensions ( ) &&
16
16
Object . keys ( obj . extensions ( ) ) . filter ( e => ! e . startsWith ( "x-parser-" ) ) . length ) ||
17
- ( fun ( obj . patternProperties ) && obj . patternProperties ( ) )
17
+ ( fun ( obj . patternProperties ) && Object . keys ( obj . patternProperties ( ) ) . length )
18
18
) return true ;
19
19
20
20
return false ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const {isExpandable} = require("../filters/all");
4
4
test . beforeEach ( t => {
5
5
t . context . doc = { } ;
6
6
t . context . types = [ { type : "string" } , { type : "number" } ] ;
7
+ t . context . doc . patternProperties = ( ) => ( { } ) ;
7
8
} ) ;
8
9
9
10
test ( "isExpandable when the object type is object" , t => {
You can’t perform that action at this time.
0 commit comments