提交 ad071b8b 编写于 作者: fxy060608's avatar fxy060608

fix(h5): hbx signal log

上级 a6c048c0
......@@ -10,11 +10,13 @@ export const h5ServeFormatter: Formatter = {
if (msg.includes(SIGNAL_H5_NETWORK)) {
networkLogs.push(msg)
process.nextTick(() => {
// 延迟打印所有 network,仅最后一个 network 替换 > 为 -,通知 hbx
const len = networkLogs.length - 1
networkLogs[len] = networkLogs[len].replace('>', '-')
console.log(networkLogs.join('\n'))
networkLogs.length = 0
if (networkLogs.length) {
// 延迟打印所有 network,仅最后一个 network 替换 > 为 -,通知 hbx
const len = networkLogs.length - 1
networkLogs[len] = networkLogs[len].replace('>', '-')
console.log(networkLogs.join('\n'))
networkLogs.length = 0
}
})
return ''
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册