aboutsummaryrefslogtreecommitdiff
path: root/src/debug/Repl.tsx
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-09-22 17:16:18 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-09-22 17:16:18 -0400
commitf82458be8bc8beaab387cc2813b7b18c9b3caac2 (patch)
tree4d547ad7f2623257cc585e16df17c05c8979e06a /src/debug/Repl.tsx
parentf529d7d22162689c08830418da67a89778111e16 (diff)
initial commit post master merge
Diffstat (limited to 'src/debug/Repl.tsx')
-rw-r--r--src/debug/Repl.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/debug/Repl.tsx b/src/debug/Repl.tsx
index 4f4db13d2..fd6b47ff0 100644
--- a/src/debug/Repl.tsx
+++ b/src/debug/Repl.tsx
@@ -28,12 +28,8 @@ class Repl extends React.Component {
if (!script.compiled) {
this.executedCommands.push({ command: this.text, result: "Compile Error" });
} else {
- const result = script.run({ makeInterface });
- if (result.success) {
- this.executedCommands.push({ command: this.text, result: result.result });
- } else {
- this.executedCommands.push({ command: this.text, result: result.error.message || result.error });
- }
+ const result = script.run({ makeInterface }, e => this.executedCommands.push({ command: this.text, result: e.message || e }));
+ result.success && this.executedCommands.push({ command: this.text, result: result.result });
}
this.text = "";
}