about summary refs log tree commit diff
path: root/src/state/models/session.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-12-06 10:11:32 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-12-06 10:11:32 -0600
commit474c4f9b5d38af565069f4b15812082946b07271 (patch)
treed6a6f9427fe5bfcc75fb91f8c2c84c4f7945faaf /src/state/models/session.ts
parent70cfae56e2ff51e609d5ae6ac6c5a69d11c2a71a (diff)
downloadvoidsky-474c4f9b5d38af565069f4b15812082946b07271.tar.zst
Rework the 'main menu' to be a screen that's always in history
Diffstat (limited to 'src/state/models/session.ts')
-rw-r--r--src/state/models/session.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/state/models/session.ts b/src/state/models/session.ts
index 069e3db32..1537d1316 100644
--- a/src/state/models/session.ts
+++ b/src/state/models/session.ts
@@ -138,7 +138,10 @@ export class SessionModel {
   }
 
   async connect(): Promise<void> {
-    this._connectPromise ??= this._connect()
+    if (this._connectPromise) {
+      return this._connectPromise
+    }
+    this._connectPromise = this._connect()
     await this._connectPromise
     this._connectPromise = undefined
   }