aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValueBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-08 18:31:32 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-08 18:31:32 -0400
commit3925f2ca6f313ba3ced747f05c4ab69a323755a7 (patch)
tree8d5837f5300f8d92d6d2a80d357e880a048a173f /src/client/views/nodes/KeyValueBox.tsx
parentb6eae4662c8422f269a4e2ec810e0e94a4b5089d (diff)
parent3a9f6df918ad45e55b0c6a540cb566aff4940288 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into propsRefactor
Diffstat (limited to 'src/client/views/nodes/KeyValueBox.tsx')
-rw-r--r--src/client/views/nodes/KeyValueBox.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx
index 9958a7c5a..8a7f32e6d 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 {