Skip to content

Commit

Permalink
fix(@uform/core): Fix the issue of the onFieldChange event after the …
Browse files Browse the repository at this point in the history
…Field is removed (#72)
  • Loading branch information
janryWang authored May 18, 2019
1 parent 9631a2f commit 30cd1e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/core/src/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ export class Field {

updateState(reducer) {
if (!isFn(reducer)) return
if (this.removed) return
const published = {
name: this.name,
path: this.path,
Expand Down
4 changes: 2 additions & 2 deletions packages/printer/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ const cleanSchema = schema => {
enum: schema.enum,
title: schema.title,
required: schema.required,

properties: Object.keys(schema.properties || {}).reduce((buf, key) => {
buf = buf || {}
buf[key] = cleanSchema(schema.properties[key])
return buf
}, {}),
}, undefined),
items: cleanSchema(schema.items)
}
}
Expand Down

0 comments on commit 30cd1e5

Please sign in to comment.