Fix linter

This commit is contained in:
Jorge Tarrero 2020-09-09 11:42:34 +02:00
parent dc1becd15c
commit e039204638

View File

@ -9,7 +9,7 @@ module.exports = class Logger {
const { LOG_LEVEL, NODE_ENV } = process.env;
const logLevelFromNodeEnv = NODE_ENV === 'test' ? 'fatal' : 'info';
const errorSerializer = DEV_ENVS.includes(NODE_ENV) ? err : wrapErrorSerializer(err => {
if (err.hasOwnProperty('stack')) {
if (Object.prototype.hasOwnProperty.call(err, 'stack')) {
err.stack = err.stack.split('\n').slice(0, 3).join('\n');
}
return err;