diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-19 16:21:36 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-19 16:21:36 -0400 |
commit | acf17966142733b073eb84e90baaa68737c1f3eb (patch) | |
tree | f2abbf92540a05e120140f6309113a265bfca4f5 /src/client/DocServer.ts | |
parent | 26d3d6c18d27a4ebb8f00e754bf3ea2cb5b08e00 (diff) | |
parent | e0c2836639110d0c7bdea311c722f406850b794d (diff) |
Merge branch 'master' into ink_menu
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r-- | src/client/DocServer.ts | 7 |
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> => { |