2aa9d73325
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
12 lines
342 B
JavaScript
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;
|
|
}
|