Skip to content

Commit

Permalink
feat(@uform/core): update setFieldState (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang authored Jun 6, 2019
1 parent 62ab251 commit 17fc96c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/core/src/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ export class Form {
updateFieldStateFromQueue() {
const failed = {}
const rafIdMap = {}
const matchResolves = []
each(this.updateQueue, ({ path, callback, resolve }, i) => {
each(this.fields, field => {
if (path && (isFn(path) || isArr(path) || isStr(path))) {
Expand Down Expand Up @@ -246,13 +245,10 @@ export class Form {
}
})
if (resolve && isFn(resolve)) {
matchResolves.push(resolve)
resolve()
}
})
this.updateQueue = []
raf(() => {
each(matchResolves, resolve => resolve())
})
}

updateFieldStateFromBuffer(field) {
Expand Down

0 comments on commit 17fc96c

Please sign in to comment.