diff options
author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-08-08 18:03:31 -0700 |
---|---|---|
committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-08-08 18:03:31 -0700 |
commit | 09a7f3711ccc0089b20c1bf9b58679e18b600081 (patch) | |
tree | d8c16d95c2ec94c0f8eae24a9869361f8cf9eebb /src/fields/ScriptField.ts | |
parent | 1032f8b421402371be4e4d62171bc837fdcb4368 (diff) | |
parent | 301b10ba693dc76ebcd42d3fa4020410f2092bee (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.ts | 4 |
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() { |