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
In the code whether the tracked attributes value has changed or not is not checked. This results in writes even if there's no change to tracked attributes.
// Check if atleast one of the attributes to be replicated was changedletrelevantUpdate=false;Object.keys(newValue).forEach(changedAttribute=>{if(trackedMasterAttributes[changedAttribute]){relevantUpdate=true;}});
We should be comparing old values of tracked attributes to new values, like
// Check if atleast one of the attributes to be replicated was changedletrelevantUpdate=false;Object.keys(newValue).forEach(changedAttribute=>{if(trackedMasterAttributes[changedAttribute]&&newValue[changedAttribute]!==oldValue[changedAttribute]){relevantUpdate=true;}});
The text was updated successfully, but these errors were encountered:
i.e. its relevant only if old and new values are not equal.
anishkny
changed the title
[REPLICATE_ATTRIBUTES] only checks if the change.after contains the tracked attributes.
[REPLICATE_ATTRIBUTES] should check if tracked value has changed before updating
Mar 26, 2020
In the code whether the tracked attributes value has changed or not is not checked. This results in writes even if there's no change to tracked attributes.
We should be comparing old values of tracked attributes to new values, like
The text was updated successfully, but these errors were encountered: