wip fix server log

This commit is contained in:
Rizky 2024-04-01 14:33:07 +07:00
parent 0cdeaa1c15
commit cdef4085f8
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ if (typeof global.server_hook === "function") {
}
ancestors.push(val);
if (val.constructor && val.constructor.name !== "Object"){
if (val.constructor &&
!['Object', 'Array'].includes(val.constructor.name)) {
if (val.constructor.name === 'Error') {
return '[Error] ' + val.message;
}