aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/ScriptField.ts
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2019-08-08 15:03:03 -0400
committermonikahedman <monika_hedman@brown.edu>2019-08-08 15:03:03 -0400
commit8f951d9110d096d665af6fbd295902ef8d3574e8 (patch)
tree37cc6881cbf93aeea5deae53a6415d6607377edc /src/new_fields/ScriptField.ts
parent030af1b9112cd12383abcd7f35142cc382ea4d6a (diff)
parent316c241d72fb83aad5f2bf9b143c317fdc906654 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into checkbox
Diffstat (limited to 'src/new_fields/ScriptField.ts')
-rw-r--r--src/new_fields/ScriptField.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/new_fields/ScriptField.ts b/src/new_fields/ScriptField.ts
index 6d52525b8..83fb52d07 100644
--- a/src/new_fields/ScriptField.ts
+++ b/src/new_fields/ScriptField.ts
@@ -137,9 +137,11 @@ export namespace ComputedField {
}
}
- Plugins.addGetterPlugin((doc, _, value) => {
- if (useComputed && value instanceof ComputedField) {
- return { value: value.value(doc), shouldReturn: true };
- }
- });
+ export function initPlugin() {
+ Plugins.addGetterPlugin((doc, _, value) => {
+ if (useComputed && value instanceof ComputedField) {
+ return { value: value.value(doc), shouldReturn: true };
+ }
+ });
+ }
} \ No newline at end of file