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 From 4b1db5899cb04f0892406be32a10bae49d6ba351 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Tue, 16 Jul 2019 22:01:24 -0400 Subject: Fixed errors --- src/client/views/SearchBox.tsx | 2 +- src/new_fields/Schema.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/new_fields') diff --git a/src/client/views/SearchBox.tsx b/src/client/views/SearchBox.tsx index 8fb43021a..1b9be841f 100644 --- a/src/client/views/SearchBox.tsx +++ b/src/client/views/SearchBox.tsx @@ -163,7 +163,7 @@ export class SearchBox extends React.Component { {this._resultsOpen ? (
- {this._results.map(result => )} + {this._results.map(result => )}
) : null} diff --git a/src/new_fields/Schema.ts b/src/new_fields/Schema.ts index 2355304d5..b1a449e08 100644 --- a/src/new_fields/Schema.ts +++ b/src/new_fields/Schema.ts @@ -104,7 +104,7 @@ export function makeStrictInterface(schema: T): (doc: Doc) } export function createSchema(schema: T): T & { proto: ToConstructor } { - schema.proto = Doc; + (schema as any).proto = Doc; return schema as any; } -- cgit v1.2.3-70-g09d2