aboutsummaryrefslogtreecommitdiff
path: root/src/debug/Repl.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2019-09-20 15:11:30 -0400
committerbobzel <zzzman@gmail.com>2019-09-20 15:11:30 -0400
commit6f7936d5c71bf3c802d73f47b19abe96c6d61848 (patch)
tree266d2f5f47bdde960656a5a14888b7bba09fac62 /src/debug/Repl.tsx
parent2a003f69f8b5323c2a6b244332b1511df1ef0cc1 (diff)
simplified script execution api a little. fixed dataDoc() related stuff in various Box's. fixed some template stuff.
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 = "";
}