You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Why aren't we passing this.snapshotForObject(object) instead of copying everying in a new empty object?Object.assign(data,this.snapshotForObject(object));result=mapping.mapObjectToCriteriaSourceForProperty(object,data,propertyName);if(this._isAsync(result)){returnresult.then(function(){Object.assign(data,self.snapshotForObject(object));returnmapping.mapRawDataToObjectProperty(data,object,propertyName);});}else{//This was already done a few lines up. Why are we re-doing this?Object.assign(data,self.snapshotForObject(object));result=mapping.mapRawDataToObjectProperty(data,object,propertyName);if(!this._isAsync(result)){result=this.nullPromise;}returnresult;}
I believe the redundancy is the second call to Object.assign(data, self.snapshotForObject(object));. Aside from that, no logical path results in duplicate calls to the same method.
data-service.js line 1424 in _fetchObjectPropertyWithPropertyDescriptor:
-> result = mapping.mapRawDataToObjectProperty(data, object, propertyName);
This was already done a few lines up:
1415: result = mapping.mapObjectToCriteriaSourceForProperty(object, data, propertyName);
Why are we re-doing this?
Need to test removing it and make sure there are no regressions.
The text was updated successfully, but these errors were encountered: