aboutsummaryrefslogtreecommitdiff
path: root/src/debug/Repl.tsx
diff options
context:
space:
mode:
authorandrewdkim <adkim414@gmail.com>2019-09-21 14:24:05 -0400
committerandrewdkim <adkim414@gmail.com>2019-09-21 14:24:05 -0400
commitc0dc4928c29e043ae897f4f7c58168831c3d8fd5 (patch)
tree214173886faf8a7bcd47fd384e3341c2f8158658 /src/debug/Repl.tsx
parent53c4f6ddad5534101d7a7482332cddb02ba99c21 (diff)
parent1d5dc3eb4095cea017412de9519b8eaee979c16c (diff)
merge from master
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 = "";
}