Closed Cap32 closed 7 years ago
reply 方法下,content 可能为 null,而且 typeof null === 'object',这段代码(144行)可能会出错
reply
content
null
typeof null === 'object'
if (Array.isArray(content)) { type = 'news'; } else if (typeof content === 'object') { // content 可能为 null if (content.hasOwnProperty('type')) { // 如果 content 为 null,会报错 if (content.type === 'customerService') { return reply2CustomerService(fromUsername, toUsername, content.kfAccount); } type = content.type; info.content = content.content; } else { type = 'music'; } }
Pull Request welcome.
reply
方法下,content
可能为null
,而且typeof null === 'object'
,这段代码(144行)可能会出错