diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-16 08:45:10 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-16 08:45:10 -0400 |
commit | ec8b9aef9ef0ce0e4bbe268524b1c185b3074f1a (patch) | |
tree | 319a75df2bf0679f26ed24c9cccd0560f460b1eb /src/client/DocServer.ts | |
parent | 23d91c839bc7dd14fd906aa1b3c7b3cd16980dd4 (diff) | |
parent | 157e80d5ee76f1c2386e2cde69fcc13188d27d8b (diff) |
Merge branch 'master' into RichTextEdition
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> => { |