Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _checkObjectsFields(checkingFromObject: Object, checkingToObject: Object) {
for (let field in checkingFromObject) {
let oldValue = this._toComparable(checkingFromObject[field]);
let newValue = this._toComparable(checkingToObject[field]);
let isEqualObjects = false;
if (typeof oldValue === 'object' && typeof newValue === 'object') {
isEqualObjects = commonUtils.equalByValue(oldValue, newValue);
}
if (oldValue !== newValue && !isEqualObjects) {
return true;
}
}
}