diff options
author | bob <bcz@cs.brown.edu> | 2019-09-11 16:28:14 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-11 16:28:14 -0400 |
commit | 4722644d09a561e394bd72c92af5561a2020776e (patch) | |
tree | 20f50e2d9ec23a2af6e75846b0d4e76b853bb766 /src/client/views/ScriptBox.tsx | |
parent | d7d73856ed405cef01b4cf727ca56f4d9a31e894 (diff) |
fixed collection iteration onClick script
Diffstat (limited to 'src/client/views/ScriptBox.tsx')
-rw-r--r-- | src/client/views/ScriptBox.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/ScriptBox.tsx b/src/client/views/ScriptBox.tsx index 8f08224c8..8f06cf770 100644 --- a/src/client/views/ScriptBox.tsx +++ b/src/client/views/ScriptBox.tsx @@ -99,6 +99,9 @@ export class ScriptBox extends React.Component<ScriptBoxProps> { let params: string[] = []; let setParams = (p: string[]) => params.splice(0, params.length, ...p); let scriptingBox = <ScriptBox initialText={originalText} setParams={setParams} onCancel={() => overlayDisposer()} onSave={(text, onError) => { + if (prewrapper) { + text = prewrapper + text + (postwrapper ? postwrapper : ""); + } const script = CompileScript(text, { params: { this: Doc.name }, typecheck: false, |