aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/List.ts
diff options
context:
space:
mode:
authorMohammad Amoush <47069173+mamoush34@users.noreply.github.com>2020-01-19 15:15:53 +0300
committerMohammad Amoush <47069173+mamoush34@users.noreply.github.com>2020-01-19 15:15:53 +0300
commit7683e1fbb53fe683c0d04e537d89fb53d768e852 (patch)
treed81eebcd5a129550a49fdfc852b8bb6220907a1a /src/new_fields/List.ts
parentf4382d73eec75f7d7f4bfe6eae3fb1efa128a021 (diff)
parentaff9cc02750eb032ade98d77cf9ff45677063fc8 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into webcam_mohammad
Diffstat (limited to 'src/new_fields/List.ts')
-rw-r--r--src/new_fields/List.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/new_fields/List.ts b/src/new_fields/List.ts
index 0c7b77fa5..bb48b1bb3 100644
--- a/src/new_fields/List.ts
+++ b/src/new_fields/List.ts
@@ -270,8 +270,8 @@ class ListImpl<T extends Field> extends ObjectField {
}
[Copy]() {
- let copiedData = this[Self].__fields.map(f => f instanceof ObjectField ? f[Copy]() : f);
- let deepCopy = new ListImpl<T>(copiedData as any);
+ const copiedData = this[Self].__fields.map(f => f instanceof ObjectField ? f[Copy]() : f);
+ const deepCopy = new ListImpl<T>(copiedData as any);
return deepCopy;
}
@@ -290,8 +290,7 @@ class ListImpl<T extends Field> extends ObjectField {
private [SelfProxy]: any;
[ToScriptString]() {
- return "invalid";
- // return `new List([${(this as any).map((field => Field.toScriptString(field))}])`;
+ return `new List([${(this as any).map((field: any) => Field.toScriptString(field))}])`;
}
}
export type List<T extends Field> = ListImpl<T> & (T | (T extends RefField ? Promise<T> : never))[];