Fix saving TypeErrors

// FREEBIE
This commit is contained in:
lilia 2015-10-21 13:33:26 -07:00
parent e842ade196
commit e68b84ad9a

View file

@ -156,7 +156,7 @@
console.log(e.reason, e.stack);
});
errors = errors.map(function(e) {
if (e.constructor === Error) {
if (e.constructor === Error || e.constructor === TypeError) {
return _.pick(e, 'name', 'message', 'code', 'number', 'reason');
}
return e;