diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-07 23:37:46 -0500 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-07 23:37:46 -0500 |
commit | 024c5339621fd220d71f0e7ce71055e3055dcfc9 (patch) | |
tree | 049cddc1ca1a8fd99bad65bcbe0690a3f51ce0ce /src/documents/Documents.ts | |
parent | 9b942166ca6b09ce4f310928c3daf8503a63ee5c (diff) | |
parent | 8d264be35a511204449c22d0a4b1754e241a3421 (diff) |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into schema
Diffstat (limited to 'src/documents/Documents.ts')
-rw-r--r-- | src/documents/Documents.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/documents/Documents.ts b/src/documents/Documents.ts index 90124d36c..ce9a1529d 100644 --- a/src/documents/Documents.ts +++ b/src/documents/Documents.ts @@ -123,7 +123,7 @@ export namespace Documents { Server.AddDocument(imageProto); return imageProto; } - return Server.GetDocument(imageProtoId, true)!; + return Server.GetField(imageProtoId) as Document; } export function ImageDocument(url: string, options: DocumentOptions = {}): Document { @@ -131,7 +131,8 @@ export namespace Documents { setupOptions(doc, options); doc.Set(KeyStore.Data, new ImageField(new URL(url))); Server.AddDocument(doc); - return Server.GetDocument(doc.Id, true)!; + var sdoc = Server.GetField(doc.Id) as Document; + return sdoc; } let collectionProto: Document; |