修复异常

This commit is contained in:
zdg 2024-09-20 15:16:34 +08:00
parent ca57e72e9c
commit c93eeeb308
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;