May be: console.log(a.toString()) with typeof(a) == 'object'
So how can i see this object? And why object show here?
var realLog = console.error; var fakelog = function(err) { if(!err) return; if(err==='[object Object]') return realLog.apply(console, [new Error(err)]); return realLog.apply(console, arguments); }; console.error= fakelog; console.warn= fakelog; console.log= fakelog; //After knowing where it comes from, you can act with the object.
Comments
Post a Comment