Skip to content

Commit

Permalink
public getField()
Browse files Browse the repository at this point in the history
  • Loading branch information
emacsway committed Oct 21, 2018
1 parent 77a3fa0 commit 364158b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions store.js
Original file line number Diff line number Diff line change
Expand Up @@ -2897,7 +2897,7 @@ function namespace(root) {
load: function(record) {
return record[this._name];
},
// Don't use tuple for support cases like new Point(x, y) -> {x: x, y: y}
// Don't use tuple for support cases like new Point(x, y) -> {x: point.x, y: point.y}
dump: function(value) {
var record = {};
record[this._name] = value;
Expand Down Expand Up @@ -3031,13 +3031,13 @@ function namespace(root) {
dump: function(obj) {
var self = this;
return keys(obj).reduce(function(accum, key) {
return clone(self._getField(key).dump(self.getObjectAccessor().getValue(obj, key)), accum);
return clone(self.getField(key).dump(self.getObjectAccessor().getValue(obj, key)), accum);
}, {});
},
loadError: function(error) {
return error; // TODO: implement me
},
// Don't use tuple for support cases like new Point(x, y) -> {x: x, y: y}
// Don't use tuple for support cases like new Point(x, y) -> {x: point.x, y: point.y}
dumpFieldValue: function(field, value) {
var result = {};
result[field] = value;
Expand All @@ -3049,7 +3049,7 @@ function namespace(root) {
getObjectAccessor: function() {
return this._objectAccessor;
},
_getField: function(name) {
getField: function(name) {
if (!(name in this._fields)) {
this._fields[name] = new Field(name);
}
Expand Down

0 comments on commit 364158b

Please sign in to comment.