fix objectDiff

This commit is contained in:
tophf 2021-08-30 21:15:44 +03:00
parent 31dd972c7a
commit a08dd2800d

View File

@ -269,7 +269,7 @@ function objectDiff(first, second, path = '') {
) { ) {
diff.push({path, key, values: [a, b], type: 'changed'}); diff.push({path, key, values: [a, b], type: 'changed'});
} }
} else if (typeof a === 'object' && typeof b === 'object') { } else if (a && b && typeof a === 'object' && typeof b === 'object') {
diff.push(...objectDiff(a, b, path + key + '.')); diff.push(...objectDiff(a, b, path + key + '.'));
} else { } else {
diff.push({path, key, values: [a, b], type: 'changed'}); diff.push({path, key, values: [a, b], type: 'changed'});