aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-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 759fd6eca..580c6040e 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -956,6 +956,9 @@ export class CurrentUserUtils {
}
static async updateUserDocument(doc: Doc, sharingDocumentId: string) {
+ if (!doc.globalGroupDatabase) doc.globalGroupDatabase = Docs.Prototypes.MainGroupDocument();
+ await DocListCastAsync((doc.globalGroupDatabase as Doc).data);
+ UserGroups.Current;
doc.system = true;
doc.noviceMode = doc.noviceMode === undefined ? "true" : doc.noviceMode;
doc.title = Doc.CurrentUserEmail;
@@ -989,10 +992,7 @@ export class CurrentUserUtils {
await this.setupSidebarButtons(doc); // the pop-out left sidebar of tools/panels
await this.setupMenuPanel(doc, sharingDocumentId);
if (!doc.globalScriptDatabase) doc.globalScriptDatabase = Docs.Prototypes.MainScriptDocument();
- doc.globalGroupDatabase = Docs.Prototypes.MainGroupDocument();
if (!doc.myLinkDatabase) doc.myLinkDatabase = new List([]);
- const x = await DocListCastAsync((doc.globalGroupDatabase as Doc).data);
- UserGroups.setCurrentUserGroups((doc.globalGroupDatabase as Doc).data as List<Doc>);
setTimeout(() => this.setupDefaultPresentation(doc), 0); // presentation that's initially triggered