diff options
author | Stanley Yip <33562077+yipstanley@users.noreply.github.com> | 2019-07-17 14:56:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-17 14:56:45 +0000 |
commit | 253813f3ed75c5bbc08f32a1e822ff922bfe185b (patch) | |
tree | 78cb59565eb78955e089a11d96011da79e0c81c7 /src/new_fields/Doc.ts | |
parent | cfc5a68c1d93f937ada7ba905265b159ec8be2a9 (diff) | |
parent | ba25d48d52f6db6021f5149e39021f651af22317 (diff) |
Merge branch 'master' into small_fix_0716
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 2 |
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; } |