1
0
Fork 0

another fix attempt on eval

refactor/models
Matthew 2019-10-27 21:46:29 -04:00
parent 1ed93f3b5f
commit e83fc9865d
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ export default class Eval extends Command {
try {
evaled = await eval(args.join(' ').trim());
if (typeof evaled !== 'string') output = output && inspect(evaled, { depth: 1 });
if (typeof evaled === 'object') {
evaled = inspect(evaled, { depth: 0 });
}
} catch (error) {
output = error.stack;
}