diff options
author | Jenny Yu <jennyyu212@outlook.com> | 2022-06-08 19:00:02 -0700 |
---|---|---|
committer | Jenny Yu <jennyyu212@outlook.com> | 2022-06-08 19:00:02 -0700 |
commit | dff15ea5cc4b351f9bea90c1822e1b02d4f0730b (patch) | |
tree | e3e893b6b8fdf95e9860673f0b4357e26dc9ff1d /src/client/views/ScriptingRepl.tsx | |
parent | 88a8f35c33bbff61b0058a66d7bcc586d483deca (diff) | |
parent | 0ae3de67900489a6ffd43eabaa810c3ec3fdddd9 (diff) |
fix: merge conflicts
Diffstat (limited to 'src/client/views/ScriptingRepl.tsx')
-rw-r--r-- | src/client/views/ScriptingRepl.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/ScriptingRepl.tsx b/src/client/views/ScriptingRepl.tsx index 2b045aa6c..4fecfa4d9 100644 --- a/src/client/views/ScriptingRepl.tsx +++ b/src/client/views/ScriptingRepl.tsx @@ -123,8 +123,9 @@ export class ScriptingRepl extends React.Component { let stopProp = true; switch (e.key) { case "Enter": { + e.stopPropagation(); const docGlobals: { [name: string]: any } = {}; - DocumentManager.Instance.DocumentViews.forEach((dv, i) => docGlobals[`d${i}`] = dv.props.Document); + Array.from(DocumentManager.Instance.DocumentViews).forEach((dv, i) => docGlobals[`d${i}`] = dv.props.Document); const globals = ScriptingGlobals.makeMutableGlobalsCopy(docGlobals); const script = CompileScript(this.commandString, { typecheck: false, addReturn: true, editable: true, params: { args: "any" }, transformer: this.getTransformer(), globals }); if (!script.compiled) { |