Merge pull request 'zdg' (#237) from zdg into main

Reviewed-on: #237
This commit is contained in:
zhengdegang 2024-09-20 15:17:16 +08:00
commit 17ef183741
1 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,8 @@ const getObjValue = (obj, key) => {
const findDifferences = (obj1, obj2) => { const findDifferences = (obj1, obj2) => {
const differences = {}; const differences = {};
function compareObjects(o1, o2, path = '') { function compareObjects(o1, o2, path = '') {
if (o1 == null) return
if (o2 == null) return
for (const key in o1) { for (const key in o1) {
if (o1.hasOwnProperty(key)) { if (o1.hasOwnProperty(key)) {
const newPath = path ? `${path}.${key}` : key; const newPath = path ? `${path}.${key}` : key;