diff options
author | ab <abdullah_ahmed@brown.edu> | 2019-04-08 18:11:45 -0400 |
---|---|---|
committer | ab <abdullah_ahmed@brown.edu> | 2019-04-08 18:11:45 -0400 |
commit | 5f9f7821bca6a9c5733e13e3d121661e18b779f7 (patch) | |
tree | cceb6107d9b395417a48559fce879082d387b04e /src/client/views/nodes/KeyValueBox.tsx | |
parent | 9e4dd13ae2f0061ebea6aa8809a5607b51b9d8c3 (diff) | |
parent | a72fcdd0ebc06a3c851007c6ed89ab13a9a0d835 (diff) |
Merge branches 'undo-expansion' and 'master' of https://github.com/browngraphicslab/Dash-Web into undo-expansion
Diffstat (limited to 'src/client/views/nodes/KeyValueBox.tsx')
-rw-r--r-- | src/client/views/nodes/KeyValueBox.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx index 283c1f732..9bd6c1052 100644 --- a/src/client/views/nodes/KeyValueBox.tsx +++ b/src/client/views/nodes/KeyValueBox.tsx @@ -40,11 +40,13 @@ export class KeyValueBox extends React.Component<FieldViewProps> { } let realDoc = doc; - let script = CompileScript(this._valueInput, undefined, true); + let script = CompileScript(this._valueInput, { addReturn: true }); if (!script.compiled) { return; } - let field = script(); + let res = script.run(); + if (!res.success) return; + const field = res.result; if (field instanceof Field) { realDoc.Set(new Key(this._keyInput), field); } else { |