aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-11-16 14:33:07 -0500
committeryipstanley <stanley_yip@brown.edu>2019-11-16 14:33:07 -0500
commit68c9c230b3c98ec70adaa1dacb66215f09d2c1f6 (patch)
treec3ef95f57ff84c847aedd0125173b6c58cbeb239 /src/server
parent0b19ecd4e65c30154a744085eb80b3b375acfe3e (diff)
parent22d1e65236bae11c508d5c34ebcbddd1a552bfd8 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into interaction_stanley
Diffstat (limited to 'src/server')
-rw-r--r--src/server/authentication/models/current_user_utils.ts3
-rw-r--r--src/server/index.ts1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts
index 3f2960d16..a1f1294e6 100644
--- a/src/server/authentication/models/current_user_utils.ts
+++ b/src/server/authentication/models/current_user_utils.ts
@@ -15,7 +15,6 @@ import { RouteStore } from "../../RouteStore";
import { InkingControl } from "../../../client/views/InkingControl";
import { DragManager } from "../../../client/util/DragManager";
import { nullAudio } from "../../../new_fields/URLField";
-import { LinkManager } from "../../../client/util/LinkManager";
export class CurrentUserUtils {
private static curr_id: string;
@@ -186,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 => {
diff --git a/src/server/index.ts b/src/server/index.ts
index 1595781dc..ddd909479 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -1163,6 +1163,7 @@ const suffixMap: { [type: string]: (string | [string, string | ((json: any) => a
"pdf": ["_t", "url"],
"audio": ["_t", "url"],
"web": ["_t", "url"],
+ "RichTextField": ["_t", value => value.Text],
"date": ["_d", value => new Date(value.date).toISOString()],
"proxy": ["_i", "fieldId"],
"list": ["_l", list => {