aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-04-05 18:30:33 -0400
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-04-05 18:30:33 -0400
commitd5e330def17940c3ada4a141685608fb1f3d5db4 (patch)
treecd551afe9d874336b66dafcd886339e6fb5aefd6
parentdec600d6f57ffd2ac4983f2f13d79d8ed394ee4a (diff)
fixed dashboard/pres undefined issue
-rw-r--r--src/client/util/CurrentUserUtils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 6b7cc8906..4b0a49180 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -1166,10 +1166,10 @@ export class CurrentUserUtils {
CurrentUserUtils.openDashboard(userDoc, copy);
}
- public static createNewDashboard = (userDoc: Doc, id?: string) => {
- const myPresentations = userDoc.myPresentations as Doc;
+ public static createNewDashboard = async (userDoc: Doc, id?: string) => {
+ const myPresentations = await userDoc.myPresentations as Doc;
const presentation = Doc.MakeCopy(userDoc.emptyPresentation as Doc, true);
- const dashboards = Cast(userDoc.myDashboards, Doc) as Doc;
+ const dashboards = await Cast(userDoc.myDashboards, Doc) as Doc;
const dashboardCount = DocListCast(dashboards.data).length + 1;
const emptyPane = Cast(userDoc.emptyPane, Doc, null);
emptyPane["dragFactory-count"] = NumCast(emptyPane["dragFactory-count"]) + 1;