From 5bb670a3a93f53c65ae225cc8572f99e9f4c4b33 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Tue, 16 Jul 2019 21:28:48 -0400 Subject: Fixed Doc.MakeCopy and fixed PDF loading... hopefully --- src/new_fields/Doc.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/new_fields') 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; } -- cgit v1.2.3-70-g09d2