aboutsummaryrefslogtreecommitdiff
path: root/src/fields/ScriptField.ts
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-08-08 18:03:31 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-08-08 18:03:31 -0700
commit09a7f3711ccc0089b20c1bf9b58679e18b600081 (patch)
treed8c16d95c2ec94c0f8eae24a9869361f8cf9eebb /src/fields/ScriptField.ts
parent1032f8b421402371be4e4d62171bc837fdcb4368 (diff)
parent301b10ba693dc76ebcd42d3fa4020410f2092bee (diff)
Merge branch 'new_audio' of https://github.com/browngraphicslab/Dash-Web into new_audio
Diffstat (limited to 'src/fields/ScriptField.ts')
-rw-r--r--src/fields/ScriptField.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fields/ScriptField.ts b/src/fields/ScriptField.ts
index bd08b2f32..f55483a5b 100644
--- a/src/fields/ScriptField.ts
+++ b/src/fields/ScriptField.ts
@@ -183,6 +183,10 @@ Scripting.addGlobal(function getIndexVal(list: any[], index: number) {
return list.reduce((p, x, i) => (i <= index && x !== undefined) || p === undefined ? x : p, undefined as any);
}, "returns the value at a given index of a list", "(list: any[], index: number)");
+Scripting.addGlobal(function makeScript(script: string) {
+ return ScriptField.MakeScript(script);
+}, "returns the value at a given index of a list", "(list: any[], index: number)");
+
export namespace ComputedField {
let useComputed = true;
export function DisableComputedFields() {