diff options
| author | bobzel <zzzman@gmail.com> | 2024-05-19 01:01:02 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-05-19 01:01:02 -0400 |
| commit | 6e72f969029c22fe797397a6437836a0482260b6 (patch) | |
| tree | e8ccde75702e557b2226c9069263e1bc3bd21a4b /src/debug/Repl.tsx | |
| parent | 5ff0bef5d3c4825aa7210a26c98aae3b24f4a835 (diff) | |
| parent | 13dc6de0e0099f699ad0d2bb54401e6a0aa25018 (diff) | |
Merge branch 'restoringEslint' into alyssa-starter
Diffstat (limited to 'src/debug/Repl.tsx')
| -rw-r--r-- | src/debug/Repl.tsx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/debug/Repl.tsx b/src/debug/Repl.tsx index a9f7c085f..8ac502348 100644 --- a/src/debug/Repl.tsx +++ b/src/debug/Repl.tsx @@ -30,7 +30,7 @@ class Repl extends React.Component { if (!script.compiled) { this.executedCommands.push({ command: this.text, result: 'Compile Error' }); } else { - const result = script.run({ makeInterface }, e => this.executedCommands.push({ command: this.text, result: e.message || e })); + const result = script.run({ makeInterface }, err => this.executedCommands.push({ command: this.text, result: err.message || err })); result.success && this.executedCommands.push({ command: this.text, result: result.result }); } this.text = ''; @@ -39,15 +39,13 @@ class Repl extends React.Component { @computed get commands() { - return this.executedCommands.map(command => { - return ( - <div style={{ marginTop: '5px' }}> - <p>{command.command}</p> - {/* <pre>{JSON.stringify(command.result, null, 2)}</pre> */} - <pre>{command.result instanceof RefField || command.result instanceof ObjectField ? 'object' : String(command.result)}</pre> - </div> - ); - }); + return this.executedCommands.map(command => ( + <div style={{ marginTop: '5px' }}> + <p>{command.command}</p> + {/* <pre>{JSON.stringify(command.result, null, 2)}</pre> */} + <pre>{command.result instanceof RefField || command.result instanceof ObjectField ? 'object' : String(command.result)}</pre> + </div> + )); } render() { |
