aboutsummaryrefslogtreecommitdiff
path: root/src/fields
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-17 12:14:55 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-17 12:14:55 -0500
commit1126d544382e192f4d36ea2b8d2320d3b47311ca (patch)
treed79cea7015f06dd98f27b19457210f0814012c8b /src/fields
parent9018ac91f926df133738c86225838cfebdcf2270 (diff)
parent375786198596ce8dcab06c39c5b4ffcca4a78b88 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_schema_view
Diffstat (limited to 'src/fields')
-rw-r--r--src/fields/Doc.ts2
-rw-r--r--src/fields/ScriptField.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 70aa2d60b..96587af44 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -670,7 +670,7 @@ export namespace Doc {
copy[key] = cfield[Copy]();// ComputedField.MakeFunction(cfield.script.originalScript);
} else if (field instanceof ObjectField) {
copy[key] = doc[key] instanceof Doc ?
- key.includes("layout[") ? Doc.MakeCopy(doc[key] as Doc, false) : doc[key] : // reference documents except copy documents that are expanded teplate fields
+ key.includes("layout[") ? undefined : doc[key] : // reference documents except remove documents that are expanded teplate fields
ObjectField.MakeCopy(field);
} else if (field instanceof Promise) {
debugger; //This shouldn't happend...
diff --git a/src/fields/ScriptField.ts b/src/fields/ScriptField.ts
index fc7f9ca80..11b3b0524 100644
--- a/src/fields/ScriptField.ts
+++ b/src/fields/ScriptField.ts
@@ -161,7 +161,7 @@ export class ComputedField extends ScriptField {
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)");
export namespace ComputedField {
let useComputed = true;