Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 17, 2017
1 parent 47fb573 commit 20bc23c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/createFieldsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ class FieldsStore {
}

getFieldMeta(name) {
if (!this.fieldsMeta[name]) {
this.fieldsMeta[name] = [{}];
}
return this.fieldsMeta[name][this.fieldsMeta[name].length - 1];
this.fieldsMeta[name] = this.fieldsMeta[name] || [];
return this.fieldsMeta[name][this.fieldsMeta[name].length - 1] || {};
}

getValueFromFields(name, fields) {
Expand Down

0 comments on commit 20bc23c

Please sign in to comment.