aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-07-23 22:11:09 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-07-23 22:11:09 -0400
commit7c2454f14eeb40c0dee6a5fefed1c954012181bb (patch)
treef69ab897f0af693e9c10a9adde32f0108e916006 /src/client/DocServer.ts
parentcb95d4b43238538f59babcaa0b0d9dabb9b393b7 (diff)
parent7f9e4de6e4b5d06535c5dfc93afa707a355a353d (diff)
merged with master
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index 8c64d2b2f..077c8e5ba 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -126,12 +126,11 @@ export namespace DocServer {
// future .proto calls on the Doc won't have to go farther than the cache to get their actual value.
const deserializeField = getSerializedField.then(async fieldJson => {
// deserialize
- const field = SerializationHelper.Deserialize(fieldJson);
+ const field = await SerializationHelper.Deserialize(fieldJson);
// either way, overwrite or delete any promises cached at this id (that we inserted as flags
// to indicate that the field was in the process of being fetched). Now everything
// should be an actual value within or entirely absent from the cache.
if (field !== undefined) {
- await field.proto;
_cache[id] = field;
} else {
delete _cache[id];
@@ -202,18 +201,18 @@ export namespace DocServer {
// future .proto calls on the Doc won't have to go farther than the cache to get their actual value.
const deserializeFields = getSerializedFields.then(async fields => {
const fieldMap: { [id: string]: RefField } = {};
- const protosToLoad: any = [];
+ // const protosToLoad: any = [];
for (const field of fields) {
if (field !== undefined) {
// deserialize
- let deserialized: any = SerializationHelper.Deserialize(field);
+ let deserialized = await SerializationHelper.Deserialize(field);
fieldMap[field.id] = deserialized;
// adds to a list of promises that will be awaited asynchronously
- protosToLoad.push(deserialized.proto);
+ // protosToLoad.push(deserialized.proto);
}
}
// this actually handles the loading of prototypes
- await Promise.all(protosToLoad);
+ // await Promise.all(protosToLoad);
return fieldMap;
});