fix objectDiff
This commit is contained in:
parent
31dd972c7a
commit
a08dd2800d
|
@ -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'});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user