aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index cf6d7d503..96a7332aa 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -63,15 +63,14 @@ export namespace Documents {
const videoProtoId = "videoProto"
const audioProtoId = "audioProto";
- export function initProtos(callback: () => void) {
- Server.GetFields([collProtoId, textProtoId, imageProtoId], (fields) => {
+ export function initProtos(): Promise<void> {
+ return Server.GetFields([textProtoId, histoProtoId, collProtoId, imageProtoId, webProtoId, kvpProtoId]).then(fields => {
textProto = fields[textProtoId] as Document;
histoProto = fields[histoProtoId] as Document;
collProto = fields[collProtoId] as Document;
imageProto = fields[imageProtoId] as Document;
webProto = fields[webProtoId] as Document;
kvpProto = fields[kvpProtoId] as Document;
- callback();
});
}
function assignOptions(doc: Document, options: DocumentOptions): Document {