aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 77e37834d..c256d2ebb 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -10,17 +10,14 @@ import { CollectionView } from "./collections/CollectionView";
AssignAllExtensions();
-export let resolvedPorts: { server: number, socket: number };
-
(async () => {
window.location.search.includes("safe") && CollectionView.SetSafeMode(true);
const info = await CurrentUserUtils.loadCurrentUser();
- resolvedPorts = JSON.parse(await Networking.FetchFromServer("/resolvedPorts"));
- DocServer.init(window.location.protocol, window.location.hostname, resolvedPorts.socket, info.email);
- await Docs.Prototypes.initialize();
if (info.id !== "__guest__") {
// a guest will not have an id registered
- await CurrentUserUtils.loadUserDocument(info);
+ await CurrentUserUtils.loadUserDocument(info.id);
+ } else {
+ await Docs.Prototypes.initialize();
}
document.getElementById('root')!.addEventListener('wheel', event => {
if (event.ctrlKey) {