Skip to content

Commit

Permalink
fix(json-schema): fix defaultValue was filter by transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed May 12, 2021
1 parent 5732eaf commit 091ca0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/json-schema/src/transformer.ts
Expand Up @@ -190,6 +190,11 @@ const omitInvalid = (target: any) => {
return reduce(
target,
(buf, value, key) => {
if (key === 'default') {
if (isValid(value)) {
buf[key] = value
}
}
if (!isEmpty(value)) {
buf[key] = value
}
Expand Down

0 comments on commit 091ca0d

Please sign in to comment.