aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-15 19:27:59 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-15 19:27:59 -0700
commit099a1942440efc2784bc9b2c5896777cf85842ec (patch)
tree56a598398fab001fb6625e20fb8c9797f71c733d /src/client/DocServer.ts
parent3cb0b3aac05d9525d6deb4683328ce1309beee32 (diff)
parent163e1f579d5a6b111645953b12e665839694585c (diff)
pull from master and cleaning up code
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index c6b3fa61f..c7dfb0b23 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -1,6 +1,6 @@
import * as io from 'socket.io-client';
import { MessageStore, YoutubeQueryTypes, GestureContent, MobileInkOverlayContent, UpdateMobileInkOverlayPositionContent, MobileDocumentUploadContent } from "./../server/Message";
-import { Opt, Doc } from '../fields/Doc';
+import { Opt, Doc, fetchProto } from '../fields/Doc';
import { Utils, emptyFunction } from '../Utils';
import { SerializationHelper } from './util/SerializationHelper';
import { RefField } from '../fields/RefField';
@@ -244,7 +244,10 @@ export namespace DocServer {
return cached;
} else {
// CACHED => great, let's just return the cached field we have
- return Promise.resolve(cached);
+ return Promise.resolve(cached).then(field => {
+ (field instanceof Doc) && fetchProto(field);
+ return field;
+ });
}
};
const _GetCachedRefFieldImpl = (id: string): Opt<RefField> => {