Commit 7e8368e5 authored by Boris Kocherov's avatar Boris Kocherov

take into account if schema = {} is same as if schema = true

parent 0b2a8073
...@@ -408,7 +408,8 @@ ...@@ -408,7 +408,8 @@
// XXX `if then else` construction can be simplify to // XXX `if then else` construction can be simplify to
// anyOf(allOf(if_schema, then_schema), else_schema) // anyOf(allOf(if_schema, then_schema), else_schema)
// and realized by existed rails // and realized by existed rails
if (schema === undefined) { if (schema === undefined ||
Object.keys(schema).length === 0) {
schema = true; schema = true;
} }
if (schema.anyOf !== undefined) { if (schema.anyOf !== undefined) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment