优化json合并

This commit is contained in:
zhangdeman committed 2024-11-25 18:54:03 +08:00
1 parent 2d10d261da
commit cb92be844e
1 file changed
+7 -1
+7 -1
View File
@@ -181,7 +181,13 @@ func (oj *ownJSON) MergeDataForMap(ignoreError bool, dataList ...any) (map[strin
}
for k, v := range itemRes {
res[k] = v
if v == nil {
if _, exist := res[k]; !exist {
res[k] = v
}
} else {
res[k] = v
}
}
}
return res, nil
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.