diff options
author | Andrew Kim <andrewdkim@users.noreply.github.com> | 2019-11-16 13:15:59 -0500 |
---|---|---|
committer | Andrew Kim <andrewdkim@users.noreply.github.com> | 2019-11-16 13:15:59 -0500 |
commit | 4a16d4b0c3a4366d6501435a3966eb2a88e42639 (patch) | |
tree | fb53b3cbec167ac62bce94b351d8fcab34a2f875 /src/server/authentication/models/current_user_utils.ts | |
parent | d7f772d93458e7669a1d2e954ad741e1c67318a5 (diff) | |
parent | 22d1e65236bae11c508d5c34ebcbddd1a552bfd8 (diff) |
merge from master
Diffstat (limited to 'src/server/authentication/models/current_user_utils.ts')
-rw-r--r-- | src/server/authentication/models/current_user_utils.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index 833e44bf6..466e2d707 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -185,6 +185,8 @@ export class CurrentUserUtils { (doc.curPresentation === undefined) && CurrentUserUtils.setupDefaultPresentation(doc); (doc.sidebarButtons === undefined) && CurrentUserUtils.setupSidebarButtons(doc); + // this is equivalent to using PrefetchProxies to make sure the recentlyClosed doc is ready + PromiseValue(Cast(doc.recentlyClosed, Doc)).then(recent => recent && PromiseValue(recent.data).then(DocListCast)); // this is equivalent to using PrefetchProxies to make sure all the sidebarButtons and noteType internal Doc's have been retrieved. PromiseValue(Cast(doc.noteTypes, Doc)).then(noteTypes => noteTypes && PromiseValue(noteTypes.data).then(DocListCast)); PromiseValue(Cast(doc.sidebarButtons, Doc)).then(stackingDoc => { |