diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-10-01 18:55:50 -0400 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-10-01 18:55:50 -0400 |
| commit | 23619154f8688ffcb25a988158d75934c0cacbf7 (patch) | |
| tree | d7462da0f0e8b9de091263af166959872e8af0f6 /src/debug/Repl.tsx | |
| parent | 45b9f489033cd323614463ca9c36f41900bf1965 (diff) | |
| parent | 69e4a936c4eb0cc2e35e4e7f3258aed1f72b8da7 (diff) | |
still unfinished
Diffstat (limited to 'src/debug/Repl.tsx')
| -rw-r--r-- | src/debug/Repl.tsx | 8 |
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 = ""; } |
