From e83fc9865dfb98b21c31fa55a625964f2deeaf63 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 21:46:29 -0400 Subject: [PATCH] another fix attempt on eval --- src/commands/eval.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 49b2c20..68f61ce 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -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; }