aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-07-16 22:27:25 -0400
committeryipstanley <stanley_yip@brown.edu>2019-07-16 22:27:25 -0400
commit9794f4c8aa4f2dfd8bee40e342fb1b26656a3caa (patch)
tree5fffaa5a21b35ac21c12eae1a3243ce81adc49ee /src/new_fields/Doc.ts
parentfd003a789941d2008d895a5e047cdd224540156a (diff)
parentf0f020501c782a4989fc1dc47031acb40335532c (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 0d9fa540f..1dd721396 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -371,6 +371,8 @@ export namespace Doc {
copy[key] = field;
} else if (field instanceof ObjectField) {
copy[key] = ObjectField.MakeCopy(field);
+ } else if (field instanceof Promise) {
+ field.then(f => (copy[key] === undefined) && (copy[key] = f)); //TODO what should we do here?
} else {
copy[key] = field;
}