diff options
-rw-r--r-- | src/state/index.ts | 2 | ||||
-rw-r--r-- | src/state/models/root-store.ts | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/state/index.ts b/src/state/index.ts index bc8a16949..5c8b50ef1 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -23,12 +23,12 @@ export async function setupState() { rootStore = new RootStoreModel(api) try { data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {} + rootStore.log.debug('Initial hydrate', {hasSession: !!data.session}) rootStore.hydrate(data) } catch (e: any) { rootStore.log.error('Failed to load state from storage', e) } - rootStore.log.debug('Initial hydrate') rootStore.session .connect() .then(() => { diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index 5349f10d0..5646157cb 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -88,6 +88,9 @@ export class RootStoreModel { if (hasProp(v, 'onboard')) { this.onboard.hydrate(v.onboard) } + if (hasProp(v, 'session')) { + this.session.hydrate(v.session) + } if (hasProp(v, 'shell')) { this.shell.hydrate(v.shell) } |