|
@@ -698,7 +698,12 @@ module.exports = {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
replaceReturn(str) {
|
|
|
- return (str && typeof str === 'string') ? str.replace(/[\r\n]/g, '') : str;
|
|
|
+ // return str
|
|
|
+ // ? (typeof str === 'string') ? str.replace(/[\r\n]/g, '') : str + ''
|
|
|
+ // : str;
|
|
|
+ return (str && typeof str === 'string')
|
|
|
+ ? str.replace(/[\r\n]/g, '')
|
|
|
+ : !_.isNil(str) ? str + '' : str;
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -847,7 +852,7 @@ module.exports = {
|
|
|
return result;
|
|
|
},
|
|
|
|
|
|
- logger(error) {
|
|
|
+ log(error) {
|
|
|
if (error.stack) {
|
|
|
this.ctx.logger.error(error);
|
|
|
} else {
|