Files
monkey-ai-web/src/helpers/log.js
T
zhanjunhao 2aa9d73325 chore(repo): 移除重复版权文件头并纳入共享单测
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
2026-11-20 11:23:49 +08:00

12 lines
342 B
JavaScript

export function getLogOther(otherStr) {
if (otherStr === undefined || otherStr === null || otherStr === '') {
otherStr = '{}';
}
let other = JSON.parse(otherStr);
// 确保返回对象而不是 null(处理 JSON.parse("null") 的情况)
if (other === null || typeof other !== 'object') {
return {};
}
return other;
}