From 32ae8dd41627ff7bb261c7e0e3e992c413c06e47 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Tue, 2 May 2023 02:35:12 -0400 Subject: [PATCH] fix(striker-ui-api): handle set session without user --- striker-ui-api/src/session.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/striker-ui-api/src/session.ts b/striker-ui-api/src/session.ts index d127889c..77fd635e 100644 --- a/striker-ui-api/src/session.ts +++ b/striker-ui-api/src/session.ts @@ -99,11 +99,11 @@ export class SessionStore extends BaseSessionStore { ): Promise { stdoutVar({ session }, `Set session ${sid}`); - const { - passport: { user: userUuid }, - } = session; + const { passport: { user: userUuid } = {} } = session; try { + assert.ok(userUuid, 'Missing user identifier'); + const localHostUuid = getLocalHostUUID(); const modifiedDate = timestamp();