Skip to content

Commit

Permalink
Fixed schema type not being deduced correctly in compute defaults (#1334
Browse files Browse the repository at this point in the history
)
  • Loading branch information
t-moe committed Jun 27, 2019
1 parent fe62b49 commit c85a5cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function computeDefaults(
defaults = schema.default;
}

switch (schema.type) {
switch (getSchemaType(schema)) {
// We need to recur for object schema inner default values.
case "object":
return Object.keys(schema.properties || {}).reduce((acc, key) => {
Expand Down

0 comments on commit c85a5cc

Please sign in to comment.