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

fix: format-log compatible with array

上级 a943f68c
...@@ -19,9 +19,9 @@ export default function formatLog () { ...@@ -19,9 +19,9 @@ export default function formatLog () {
} }
var msgs = args.map(function (v) { var msgs = args.map(function (v) {
var type = Object.prototype.toString.call(v) var type = Object.prototype.toString.call(v).toLowerCase()
if (type.toLowerCase() === '[object object]') { if (type === '[object object]' || type === '[object array]') {
try { try {
v = '---BEGIN:JSON---' + JSON.stringify(v) + '---END:JSON---' v = '---BEGIN:JSON---' + JSON.stringify(v) + '---END:JSON---'
} catch (e) { } catch (e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册